Skip to content

Commit 7c565a4

Browse files
compudjrostedt
authored andcommitted
rcupdate_trace: Define rcu_tasks_trace lock guard
Define a rcu_tasks_trace lock guard for use by the syscall enter/exit tracepoints. Cc: Linus Torvalds <torvalds@linux-foundation.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Michael Jeanson <mjeanson@efficios.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Alexei Starovoitov <ast@kernel.org> Cc: Yonghong Song <yhs@fb.com> Cc: Paul E. McKenney <paulmck@kernel.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Mark Rutland <mark.rutland@arm.com> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Andrii Nakryiko <andrii.nakryiko@gmail.com> Cc: bpf@vger.kernel.org Cc: Joel Fernandes <joel@joelfernandes.org> Cc: Jordan Rife <jrife@google.com> Cc: linux-trace-kernel@vger.kernel.org Link: https://lore.kernel.org/20241123153031.2884933-4-mathieu.desnoyers@efficios.com Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
1 parent 89c7e17 commit 7c565a4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

include/linux/rcupdate_trace.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include <linux/sched.h>
1212
#include <linux/rcupdate.h>
13+
#include <linux/cleanup.h>
1314

1415
extern struct lockdep_map rcu_trace_lock_map;
1516

@@ -98,4 +99,8 @@ static inline void rcu_read_lock_trace(void) { BUG(); }
9899
static inline void rcu_read_unlock_trace(void) { BUG(); }
99100
#endif /* #ifdef CONFIG_TASKS_TRACE_RCU */
100101

102+
DEFINE_LOCK_GUARD_0(rcu_tasks_trace,
103+
rcu_read_lock_trace(),
104+
rcu_read_unlock_trace())
105+
101106
#endif /* __LINUX_RCUPDATE_TRACE_H */

0 commit comments

Comments
 (0)