diff options
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index adbe1670b366..3084f80909cd 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -106,6 +106,14 @@ static inline int srcu_read_lock_held(struct srcu_struct *sp) | |||
106 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ | 106 | #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */ |
107 | 107 | ||
108 | /** | 108 | /** |
109 | * srcu_dereference - fetch SRCU-protected pointer with checking | ||
110 | * | ||
111 | * Makes rcu_dereference_check() do the dirty work. | ||
112 | */ | ||
113 | #define srcu_dereference(p, sp) \ | ||
114 | rcu_dereference_check(p, srcu_read_lock_held(sp)) | ||
115 | |||
116 | /** | ||
109 | * srcu_read_lock - register a new reader for an SRCU-protected structure. | 117 | * srcu_read_lock - register a new reader for an SRCU-protected structure. |
110 | * @sp: srcu_struct in which to register the new reader. | 118 | * @sp: srcu_struct in which to register the new reader. |
111 | * | 119 | * |