Skip to content

Commit 954c0d7

Browse files
paulmckrcuNeeraj Upadhyay (AMD)
authored andcommitted
srcu: Add guards for SRCU-fast readers
This adds the usual scoped_guard(srcu_fast, &my_srcu) and guard(srcu_fast)(&my_srcu). Suggested-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Steven Rostedt (Google) <rostedt@goodmis.org> Signed-off-by: Neeraj Upadhyay (AMD) <neeraj.upadhyay@kernel.org>
1 parent 2a73ebf commit 954c0d7

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

include/linux/srcu.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -481,4 +481,9 @@ DEFINE_LOCK_GUARD_1(srcu, struct srcu_struct,
481481
srcu_read_unlock(_T->lock, _T->idx),
482482
int idx)
483483

484+
DEFINE_LOCK_GUARD_1(srcu_fast, struct srcu_struct,
485+
_T->scp = srcu_read_lock_fast(_T->lock),
486+
srcu_read_unlock_fast(_T->lock, _T->scp),
487+
struct srcu_ctr __percpu *scp)
488+
484489
#endif

0 commit comments

Comments
 (0)