remove ugly gcc warning removal ack, simply cast the caller parameter
authorMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 02:47:01 +0000 (21:47 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
Fri, 6 Feb 2009 02:47:01 +0000 (21:47 -0500)
test_urcu.c
urcu.c
urcu.h

index 2b34798986ae14fc6b80ff6a749f6c800516816d..17061f81a250d5f12f7e4836d7caf81835cd43d4 100644 (file)
@@ -82,7 +82,7 @@ void *thr_writer(void *arg)
                new->a = 8;
                new->b = 12;
                new->c[55] = 2;
-               old = urcu_publish_content(&test_rcu_pointer, new);
+               old = urcu_publish_content((void **)&test_rcu_pointer, new);
                rcu_write_unlock();
                /* can be done after unlock */
                if (old) {
diff --git a/urcu.c b/urcu.c
index e258d96fab4e730d42fc22c4a3e58870e42bda4e..d0d61385385d713bf221e078767295bd3ecfb2d6 100644 (file)
--- a/urcu.c
+++ b/urcu.c
@@ -117,7 +117,7 @@ void wait_for_quiescent_state(int parity)
  * Return old pointer, OK to free, no more reference exist.
  * Called under rcu_write_lock.
  */
-void *_urcu_publish_content(void **ptr, void *new)
+void *urcu_publish_content(void **ptr, void *new)
 {
        int prev_parity;
        void *oldptr;
diff --git a/urcu.h b/urcu.h
index 3c5b178d1a8254adb37331fea6b61698a58c459c..9431da547bfcc8245d07969de426ac33c7fe3d2d 100644 (file)
--- a/urcu.h
+++ b/urcu.h
@@ -104,13 +104,7 @@ static inline void rcu_read_unlock(int urcu_parity)
 extern void rcu_write_lock(void);
 extern void rcu_write_unlock(void);
 
-extern void *_urcu_publish_content(void **ptr, void *new);
-
-/*
- * gcc does not like automatic &struct ... * -> void **.
- * Remove the warning. (hopefully this is ok)
- */
-#define urcu_publish_content(ptr, new) _urcu_publish_content((void **)ptr, new)
+extern void *urcu_publish_content(void **ptr, void *new);
 
 /*
  * Reader thread registration.
This page took 0.026208 seconds and 4 git commands to generate.