2 * SPDX-License-Identifier: MIT
4 * Copyright (C) 2011-2012 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
7 #ifndef _LTTNG_TRACEPOINT_RCU_H
8 #define _LTTNG_TRACEPOINT_RCU_H
10 #include <urcu/compiler.h>
11 #include <lttng/urcu/pointer.h>
15 #include <lttng/urcu/urcu-ust.h>
17 #define tp_rcu_read_lock lttng_ust_urcu_read_lock
18 #define tp_rcu_read_unlock lttng_ust_urcu_read_unlock
19 #define tp_rcu_dereference lttng_ust_rcu_dereference
20 #define TP_RCU_LINK_TEST() 1
22 #else /* _LGPL_SOURCE */
24 #define tp_rcu_read_lock tracepoint_dlopen_ptr->rcu_read_lock_sym
25 #define tp_rcu_read_unlock tracepoint_dlopen_ptr->rcu_read_unlock_sym
27 #define tp_rcu_dereference(p) \
28 URCU_FORCE_CAST(__typeof__(p), \
29 tracepoint_dlopen_ptr->rcu_dereference_sym(URCU_FORCE_CAST(void *, p)))
31 #define TP_RCU_LINK_TEST() (tracepoint_dlopen_ptr && tp_rcu_read_lock)
33 #endif /* _LGPL_SOURCE */
35 #endif /* _LTTNG_TRACEPOINT_RCU_H */
This page took 0.02985 seconds and 4 git commands to generate.