RCU
include/sync/rcu.h View source View on GitHubForward declaration so we can put this pointer in threads
Structs
Section titled “Structs”rcu_cb
Section titled “rcu_cb”__RCU_READ_LOCKED_ctx
Section titled “__RCU_READ_LOCKED_ctx” TSA_REENTRANT_CAPABILITY_DECLARE("rcu", RCU_READ_LOCKED) (2 declarations) source
§
struct __RCU_READ_LOCKED_ctx §
struct __RCU_READ_LOCKED_ctx RCU_READ_LOCKED Type Aliases
Section titled “Type Aliases”rcu_fn
Section titled “rcu_fn”Functions
Section titled “Functions”rcu_init
Section titled “rcu_init”void rcu_init(void) source rcu_synchronize
Section titled “rcu_synchronize”void rcu_synchronize(void) source rcu_defer
Section titled “rcu_defer”void rcu_defer(struct rcu_cb *cc_nonnull_ptr, rcu_fn cc_nonnull_ptr) source rcu_note_context_switch
Section titled “rcu_note_context_switch”rcu_note_irq_exit
Section titled “rcu_note_irq_exit”void rcu_note_irq_exit(void) source rcu_idle_enter
Section titled “rcu_idle_enter”void rcu_idle_enter(void) source rcu_idle_exit
Section titled “rcu_idle_exit”void rcu_idle_exit(void) source rcu_read_guard_exit
Section titled “rcu_read_guard_exit”void rcu_read_guard_exit(int *unused) source rcu_read_guard_enter
Section titled “rcu_read_guard_enter”int rcu_read_guard_enter(void) source Macros
Section titled “Macros”rcu_cb_from_list_node
Section titled “rcu_cb_from_list_node”#define rcu_cb_from_list_node(ln) source TODO
as debug flags get better, move away from raw TEST_ENABLED
Expansion
#define rcu_cb_from_list_node(ln) (container_of(ln, struct rcu_cb, list)) rcu_plain_t
Section titled “rcu_plain_t”#define rcu_plain_t(p) source Expansion
#define rcu_plain_t(p) __typeof_unqual__(*(p)) * rcu_dereference
Section titled “rcu_dereference”#define rcu_dereference(p) source Expansion
#define rcu_dereference(p) \
((rcu_plain_t(p)) atomic_load_acq((_Atomic __typeof_unqual__(p) *) &(p))) rcu_assign_pointer
Section titled “rcu_assign_pointer”#define rcu_assign_pointer(p, v) source Expansion
#define rcu_assign_pointer(p, v) \
({ \
rcu_plain_t(p) _v = (v); \
atomic_store_release((_Atomic __typeof_unqual__(p) *) &(p), \
(__typeof_unqual__(p)) _v); \
_v; \
}) rcu_access_pointer
Section titled “rcu_access_pointer”#define rcu_access_pointer(p) source Expansion
#define rcu_access_pointer(p) ((rcu_plain_t(p)) ca_read_once(p)) RCU_INIT_POINTER
Section titled “RCU_INIT_POINTER”#define RCU_INIT_POINTER(p, v) source Expansion
#define RCU_INIT_POINTER(p, v) ((p) = (typeof(p)) (rcu_plain_t(p))(v)) rcu_read_guard
Section titled “rcu_read_guard”#define rcu_read_guard() source Expansion
#define rcu_read_guard() \
cc_cleanup(rcu_read_guard_exit) int PP_CONCAT( \
rcu_read_guard_, __COUNTER__) = rcu_read_guard_enter()