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
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;
-}
#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);
#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 */