|
@@ -235,6 +235,17 @@ static inline void raw_write_seqcount_end(seqcount_t *s)
|
|
s->sequence++;
|
|
s->sequence++;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+/*
|
|
|
|
+ * 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
|
|
* Sequence counter only version assumes that callers are using their
|
|
* own mutexing.
|
|
* own mutexing.
|