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 f002c34..bb98a19 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 fdf4712..6eebdc7 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 7fdb1a6..c13ad63 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 9d4cd3c..a0aac21 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.032793 seconds and 4 git commands to generate.