projects
/
urcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixes to allow building on Power
[urcu.git]
/
tests
/
test_urcu.c
diff --git
a/tests/test_urcu.c
b/tests/test_urcu.c
index 18683bf3928972cdc6cec5cfaacc753596a4f9a3..2f8cd163ee7ac7a7ac284b9d31bec7d97905e1bc 100644
(file)
--- a/
tests/test_urcu.c
+++ b/
tests/test_urcu.c
@@
-32,11
+32,9
@@
#include <assert.h>
#include <sys/syscall.h>
#include <sched.h>
#include <assert.h>
#include <sys/syscall.h>
#include <sched.h>
+#include <errno.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>
/* hardcoded number of CPUs */
#define NR_CPUS 16384
/* hardcoded number of CPUs */
#define NR_CPUS 16384
@@
-61,7
+59,7
@@
static inline pid_t gettid(void)
#else
#define debug_yield_read()
#endif
#else
#define debug_yield_read()
#endif
-#include
"../urcu.h"
+#include
<urcu.h>
struct test_array {
int a;
struct test_array {
int a;
@@
-259,7
+257,8
@@
void *thr_writer(void *_count)
for (;;) {
new = test_array_alloc();
new->a = 8;
for (;;) {
new = test_array_alloc();
new->a = 8;
- old = rcu_publish_content(&test_rcu_pointer, new);
+ old = rcu_xchg_pointer(&test_rcu_pointer, new);
+ synchronize_rcu();
if (old)
old->a = 0;
test_array_free(old);
if (old)
old->a = 0;
test_array_free(old);
This page took
0.023275 seconds
and
4
git commands to generate.