1 // SPDX-FileCopyrightText: 2009 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2 // SPDX-FileCopyrightText: 2009 Paul E. McKenney, IBM Corporation.
4 // SPDX-License-Identifier: LGPL-2.1-or-later
10 * Userspace RCU header
12 * LGPL-compatible code should include this header with :
14 * #define _LGPL_SOURCE
17 * IBM's contributions to this file may be relicensed under LGPLv2 or later.
25 * See urcu/pointer.h and urcu/static/pointer.h for pointer
26 * publication headers.
28 #include <urcu/pointer.h>
29 #include <urcu/urcu-poll.h>
35 #include <urcu/map/urcu-mb.h>
40 * Each thread containing read-side critical sections must be registered
41 * with rcu_register_thread_mb() before calling rcu_read_lock_mb().
42 * rcu_unregister_thread_mb() should be called before the thread exits.
47 #include <urcu/static/urcu-mb.h>
50 * Mappings for static use of the userspace RCU library.
51 * Should only be used in LGPL-compatible code.
58 * Mark the beginning and end of a read-side critical section.
59 * DON'T FORGET TO USE RCU_REGISTER/UNREGISTER_THREAD() FOR EACH THREAD WITH
60 * READ-SIDE CRITICAL SECTION.
62 #define urcu_mb_read_lock _urcu_mb_read_lock
63 #define urcu_mb_read_unlock _urcu_mb_read_unlock
64 #define urcu_mb_read_ongoing _urcu_mb_read_ongoing
66 #else /* !_LGPL_SOURCE */
69 * library wrappers to be used by non-LGPL compatible source code.
70 * See LGPL-only urcu/static/pointer.h for documentation.
73 extern void urcu_mb_read_lock(void);
74 extern void urcu_mb_read_unlock(void);
75 extern int urcu_mb_read_ongoing(void);
77 #endif /* !_LGPL_SOURCE */
79 extern void urcu_mb_synchronize_rcu(void);
82 * RCU grace period polling API.
84 extern struct urcu_gp_poll_state
urcu_mb_start_poll_synchronize_rcu(void);
85 extern bool urcu_mb_poll_state_synchronize_rcu(struct urcu_gp_poll_state state
);
88 * Reader thread registration.
90 extern void urcu_mb_register_thread(void);
91 extern void urcu_mb_unregister_thread(void);
94 * Explicit rcu initialization, for "early" use within library constructors.
96 extern void urcu_mb_init(void);
99 * Q.S. reporting are no-ops for these URCU flavors.
101 static inline void urcu_mb_quiescent_state(void)
105 static inline void urcu_mb_thread_offline(void)
109 static inline void urcu_mb_thread_online(void)
117 #include <urcu/call-rcu.h>
118 #include <urcu/defer.h>
119 #include <urcu/flavor.h>
122 #include <urcu/map/clear.h>
125 #endif /* _URCU_MB_H */
This page took 0.038397 seconds and 4 git commands to generate.