projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Using AM_PROG_MKDIR_P for compatibility
[urcu.git]
/
tests
/
test_urcu_timing.c
diff --git
a/tests/test_urcu_timing.c
b/tests/test_urcu_timing.c
index a3ca783a35a806daae65f914fec9bec2c2f0ab58..79cd838f56084cd6aae287619206a42d777eab29 100644
(file)
--- a/
tests/test_urcu_timing.c
+++ b/
tests/test_urcu_timing.c
@@
-30,10
+30,7
@@
#include <stdio.h>
#include <assert.h>
#include <sys/syscall.h>
#include <stdio.h>
#include <assert.h>
#include <sys/syscall.h>
-#include "../arch.h"
-
-/* Make this big enough to include the POWER5+ L3 cacheline size of 256B */
-#define CACHE_LINE_SIZE 4096
+#include <urcu/arch.h>
#if defined(_syscall0)
_syscall0(pid_t, gettid)
#if defined(_syscall0)
_syscall0(pid_t, gettid)
@@
-51,7
+48,7
@@
static inline pid_t gettid(void)
#endif
#define _LGPL_SOURCE
#endif
#define _LGPL_SOURCE
-#include
"../urcu.h"
+#include
<urcu.h>
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t rcu_copy_mutex = PTHREAD_MUTEX_INITIALIZER;
@@
-155,8
+152,9
@@
void *thr_writer(void *arg)
assert(old->a == 8);
}
new->a = 8;
assert(old->a == 8);
}
new->a = 8;
- old = rcu_
publish_content
(&test_rcu_pointer, new);
+ old = rcu_
xchg_pointer
(&test_rcu_pointer, new);
rcu_copy_mutex_unlock();
rcu_copy_mutex_unlock();
+ synchronize_rcu();
/* can be done after unlock */
if (old) {
old->a = 0;
/* can be done after unlock */
if (old) {
old->a = 0;
This page took
0.031244 seconds
and
4
git commands to generate.