Fix rcu_assign_pointer() dynamic linking behavior
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 1 Oct 2009 02:28:47 +0000 (22:28 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Thu, 1 Oct 2009 02:28:47 +0000 (22:28 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
urcu-qsbr.c
urcu-qsbr.h
urcu.c
urcu.h

index f002c345dcb7325d7bb6fb0221518587d35c4fc1..bb98a199d5138664c4f2e03b14ca7a45cde93c98 100644 (file)
@@ -286,7 +286,7 @@ void *rcu_dereference(void *p)
 void *rcu_assign_pointer_sym(void **p, void *v)
 {
        wmb();
-       return STORE_SHARED(p, v);
+       return STORE_SHARED(*p, v);
 }
 
 void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new)
index fdf47124d85f2b170f78410a996f5c3f40e4f8cc..6eebdc7a489badf25d6f76e29a964e563142fd83 100644 (file)
@@ -102,7 +102,7 @@ extern void rcu_thread_online(void);
 extern void *rcu_assign_pointer_sym(void **p, void *v);
 
 #define rcu_assign_pointer(p, v)                       \
-       rcu_assign_pointer_sym((void **)(p), (v))
+       rcu_assign_pointer_sym((void **)(&(p)), (v))
 
 extern void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new);
 #define rcu_cmpxchg_pointer(p, old, _new)              \
diff --git a/urcu.c b/urcu.c
index 7fdb1a6a675692cf8e25c39bfd6dde1f1e68f82a..c13ad634e7cb7b98f24d8c9a5a756eb26487bf7b 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -380,7 +380,7 @@ void *rcu_dereference(void *p)
 void *rcu_assign_pointer_sym(void **p, void *v)
 {
        wmb();
-       return STORE_SHARED(p, v);
+       return STORE_SHARED(*p, v);
 }
 
 void *rcu_xchg_pointer_sym(void **p, void *v)
diff --git a/urcu.h b/urcu.h
index 9d4cd3c2b7ef6cbd43988cef06f4f694f063626b..a0aac2195feea64a90043866950cfe0322eb0df7 100644 (file)
--- a/urcu.h
+++ b/urcu.h
@@ -74,7 +74,7 @@ extern void *rcu_dereference(void *p);
 extern void *rcu_assign_pointer_sym(void **p, void *v);
 
 #define rcu_assign_pointer(p, v)                       \
-       rcu_assign_pointer_sym((void **)(p), (v))
+       rcu_assign_pointer_sym((void **)(&(p)), (v))
 
 extern void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new);
 #define rcu_cmpxchg_pointer(p, old, _new)              \
This page took 0.025963 seconds and 4 git commands to generate.