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-signal.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-signal.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_signal_read_lock _urcu_signal_read_lock
63 #define urcu_signal_read_unlock _urcu_signal_read_unlock
64 #define urcu_signal_read_ongoing _urcu_signal_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_signal_read_lock(void);
74 extern void urcu_signal_read_unlock(void);
75 extern int urcu_signal_read_ongoing(void);
77 #endif /* !_LGPL_SOURCE */
79 extern void urcu_signal_synchronize_rcu(void);
82 * RCU grace period polling API.
84 extern struct urcu_gp_poll_state
urcu_signal_start_poll_synchronize_rcu(void);
85 extern bool urcu_signal_poll_state_synchronize_rcu(struct urcu_gp_poll_state state
);
88 * Reader thread registration.
90 extern void urcu_signal_register_thread(void);
91 extern void urcu_signal_unregister_thread(void);
94 * Explicit rcu initialization, for "early" use within library constructors.
96 extern void urcu_signal_init(void);
99 * Q.S. reporting are no-ops for these URCU flavors.
101 static inline void urcu_signal_quiescent_state(void)
105 static inline void urcu_signal_thread_offline(void)
109 static inline void urcu_signal_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_SIGNAL_H */
This page took 0.033978 seconds and 4 git commands to generate.