diff options
Diffstat (limited to 'include/linux/srcu.h')
-rw-r--r-- | include/linux/srcu.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/srcu.h b/include/linux/srcu.h index c114614ed172..9b058eecd403 100644 --- a/include/linux/srcu.h +++ b/include/linux/srcu.h | |||
@@ -237,4 +237,18 @@ static inline void srcu_read_unlock(struct srcu_struct *sp, int idx) | |||
237 | __srcu_read_unlock(sp, idx); | 237 | __srcu_read_unlock(sp, idx); |
238 | } | 238 | } |
239 | 239 | ||
240 | /** | ||
241 | * smp_mb__after_srcu_read_unlock - ensure full ordering after srcu_read_unlock | ||
242 | * | ||
243 | * Converts the preceding srcu_read_unlock into a two-way memory barrier. | ||
244 | * | ||
245 | * Call this after srcu_read_unlock, to guarantee that all memory operations | ||
246 | * that occur after smp_mb__after_srcu_read_unlock will appear to happen after | ||
247 | * the preceding srcu_read_unlock. | ||
248 | */ | ||
249 | static inline void smp_mb__after_srcu_read_unlock(void) | ||
250 | { | ||
251 | /* __srcu_read_unlock has smp_mb() internally so nothing to do here. */ | ||
252 | } | ||
253 | |||
240 | #endif | 254 | #endif |