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) } /* + * raw_write_seqcount_latch - redirect readers to even/odd copy + * @s: pointer to seqcount_t + */ +static inline void raw_write_seqcount_latch(seqcount_t *s) +{ + smp_wmb(); /* prior stores before incrementing "sequence" */ + s->sequence++; + smp_wmb(); /* increment "sequence" before following stores */ +} + +/* * Sequence counter only version assumes that callers are using their * own mutexing. */ |