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 <[email protected]> Signed-off-by: Paul E. McKenney <[email protected]> Cc: Mathieu Desnoyers <[email protected]> Cc: Sebastian Andrzej Siewior <[email protected]> Reviewed-by: Steven Rostedt (Google) <[email protected]> Signed-off-by: Neeraj Upadhyay (AMD) <[email protected]>
1 parent 2a73ebf commit 954c0d7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

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)