diff options
-rw-r--r-- | include/linux/seqlock.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h index dcc64b9bfc41..cce6e7453592 100644 --- a/include/linux/seqlock.h +++ b/include/linux/seqlock.h | |||
@@ -236,6 +236,17 @@ static inline void raw_write_seqcount_end(seqcount_t *s) | |||
236 | } | 236 | } |
237 | 237 | ||
238 | /* | 238 | /* |
239 | * raw_write_seqcount_latch - redirect readers to even/odd copy | ||
240 | * @s: pointer to seqcount_t | ||
241 | */ | ||
242 | static inline void raw_write_seqcount_latch(seqcount_t *s) | ||
243 | { | ||
244 | smp_wmb(); /* prior stores before incrementing "sequence" */ | ||
245 | s->sequence++; | ||
246 | smp_wmb(); /* increment "sequence" before following stores */ | ||
247 | } | ||
248 | |||
249 | /* | ||
239 | * Sequence counter only version assumes that callers are using their | 250 | * Sequence counter only version assumes that callers are using their |
240 | * own mutexing. | 251 | * own mutexing. |
241 | */ | 252 | */ |