58de697be88ebb660103be47b3e06dfa8ab35942
1 // SPDX-FileCopyrightText: 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
3 // SPDX-License-Identifier: MIT
5 #ifndef _LTTNG_UST_TRACEPOINT_RCU_H
6 #define _LTTNG_UST_TRACEPOINT_RCU_H
8 #include <urcu/compiler.h>
9 #include <lttng/urcu/pointer.h>
10 #include <lttng/ust-api-compat.h>
14 #include <lttng/urcu/urcu-ust.h>
16 #define lttng_ust_tp_rcu_read_lock lttng_ust_urcu_read_lock
17 #define lttng_ust_tp_rcu_read_unlock lttng_ust_urcu_read_unlock
18 #define lttng_ust_tp_rcu_dereference lttng_ust_rcu_dereference
19 #define LTTNG_UST_TP_RCU_LINK_TEST() 1
21 #else /* _LGPL_SOURCE */
23 #define lttng_ust_tp_rcu_read_lock lttng_ust_tracepoint_dlopen_ptr->rcu_read_lock_sym
24 #define lttng_ust_tp_rcu_read_unlock lttng_ust_tracepoint_dlopen_ptr->rcu_read_unlock_sym
26 #define lttng_ust_tp_rcu_dereference(p) \
27 URCU_FORCE_CAST(__typeof__(p), \
28 lttng_ust_tracepoint_dlopen_ptr->rcu_dereference_sym(URCU_FORCE_CAST(void *, p)))
30 #define LTTNG_UST_TP_RCU_LINK_TEST() (lttng_ust_tracepoint_dlopen_ptr && lttng_ust_tp_rcu_read_lock)
32 #endif /* _LGPL_SOURCE */
34 #if LTTNG_UST_COMPAT_API(0)
35 #define tp_rcu_read_lock lttng_ust_tp_rcu_read_lock
36 #define tp_rcu_read_unlock lttng_ust_tp_rcu_read_unlock
37 #define tp_rcu_dereference lttng_ust_tp_rcu_dereference
38 #define TP_RCU_LINK_TEST LTTNG_UST_TP_RCU_LINK_TEST
41 #endif /* _LTTNG_UST_TRACEPOINT_RCU_H */
This page took 0.031706 seconds and 5 git commands to generate.