9 * Copyright February 2009 - Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
11 * Credits for Paul E. McKenney <paulmck@linux.vnet.ibm.com>
12 * for inspiration coming from the Linux kernel RCU and rcu-preempt.
14 * LGPL-compatible code should include this header with :
16 * #define _LGPL_SOURCE
19 * Distributed under LGPLv2.1
21 * IBM's contributions to this file may be relicensed under LGPLv2 or later.
29 #include <urcu-static.h>
32 * Mappings for static use of the userspace RCU library.
33 * Should only be used in LGPL-compatible code.
36 #define rcu_dereference _rcu_dereference
37 #define rcu_read_lock _rcu_read_lock
38 #define rcu_read_unlock _rcu_read_unlock
40 #define rcu_assign_pointer _rcu_assign_pointer
41 #define rcu_xchg_pointer _rcu_xchg_pointer
42 #define rcu_publish_content _rcu_publish_content
44 #else /* !_LGPL_SOURCE */
47 * library wrappers to be used by non-LGPL compatible source code.
50 extern void rcu_read_lock(void);
51 extern void rcu_read_unlock(void);
53 extern void *rcu_dereference(void *p
);
55 extern void *rcu_assign_pointer_sym(void **p
, void *v
);
57 #define rcu_assign_pointer(p, v) \
58 rcu_assign_pointer_sym((void **)(p), (v))
60 extern void *rcu_xchg_pointer_sym(void **p
, void *v
);
61 #define rcu_xchg_pointer(p, v) \
62 rcu_xchg_pointer_sym((void **)(p), (v))
64 extern void *rcu_publish_content_sym(void **p
, void *v
);
65 #define rcu_publish_content(p, v) \
66 rcu_publish_content_sym((void **)(p), (v))
68 #endif /* !_LGPL_SOURCE */
70 extern void synchronize_rcu(void);
73 * Reader thread registration.
75 extern void rcu_register_thread(void);
76 extern void rcu_unregister_thread(void);
This page took 0.032154 seconds and 5 git commands to generate.