From b1048d48b166d50e10d1eb3a1e512a7bffb2a265 Mon Sep 17 00:00:00 2001 From: Mathieu Desnoyers Date: Mon, 5 Oct 2009 15:04:01 -0400 Subject: [PATCH] Remove rcu_publish_content() API phased-out. Cannot use call_rcu anyway. Use rcu_xchg_pointer and synchronize_rcu or rcu_xchg_pointer and call_rcu instead. Signed-off-by: Mathieu Desnoyers --- urcu-pointer-static.h | 13 ------------- urcu-pointer.c | 9 --------- urcu-pointer.h | 16 ---------------- 3 files changed, 38 deletions(-) diff --git a/urcu-pointer-static.h b/urcu-pointer-static.h index c2ba800..06b8881 100644 --- a/urcu-pointer-static.h +++ b/urcu-pointer-static.h @@ -102,19 +102,6 @@ STORE_SHARED(*(p), v); \ }) -/* - * _rcu_publish_content - Exchanges the pointer and waits for quiescent state. - * - * The pointer returned can be freed. - */ -#define _rcu_publish_content(p, v) \ - ({ \ - void *oldptr; \ - oldptr = _rcu_xchg_pointer(p, v); \ - synchronize_rcu(); \ - oldptr; \ - }) - /** * _rcu_assign_pointer - assign (publicize) a pointer to a new data structure * meant to be read by RCU read-side critical sections. Returns the assigned diff --git a/urcu-pointer.c b/urcu-pointer.c index 1461c60..93d4987 100644 --- a/urcu-pointer.c +++ b/urcu-pointer.c @@ -52,12 +52,3 @@ void *rcu_cmpxchg_pointer_sym(void **p, void *old, void *_new) wmb(); return uatomic_cmpxchg(p, old, _new); } - -void *rcu_publish_content_sym(void **p, void *v) -{ - void *oldptr; - - oldptr = _rcu_xchg_pointer(p, v); - synchronize_rcu(); - return oldptr; -} diff --git a/urcu-pointer.h b/urcu-pointer.h index 748a37a..0a3524f 100644 --- a/urcu-pointer.h +++ b/urcu-pointer.h @@ -58,18 +58,6 @@ #define rcu_xchg_pointer _rcu_xchg_pointer #define rcu_set_pointer _rcu_set_pointer -/* - * type *rcu_publish_content(type **ptr, type *new) - * - * Exchanges the pointer and waits for quiescent state. The pointer returned - * can be freed. You are encouraged to use either - * - rcu_cmpxchg_pointer - * - rcu_xchg_pointer - * - rcu_set_pointer - * with call_rcu(free, ptr) instead to deal with reclamation more efficiently. - */ -#define rcu_publish_content _rcu_publish_content - #else /* !_LGPL_SOURCE */ extern void *rcu_dereference(void *p); @@ -86,10 +74,6 @@ extern void *rcu_set_pointer_sym(void **p, void *v); #define rcu_set_pointer(p, v) \ rcu_set_pointer_sym((void **)(p), (v)) -extern void *rcu_publish_content_sym(void **p, void *v); -#define rcu_publish_content(p, v) \ - rcu_publish_content_sym((void **)(p), (v)) - extern void *rcu_assign_pointer_sym(void **p, void *v); #endif /* !_LGPL_SOURCE */ -- 2.34.1