Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F109439853
D42810.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D42810.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/seqlock.h b/sys/compat/linuxkpi/common/include/linux/seqlock.h
--- a/sys/compat/linuxkpi/common/include/linux/seqlock.h
+++ b/sys/compat/linuxkpi/common/include/linux/seqlock.h
@@ -31,6 +31,7 @@
#include <sys/param.h>
#include <sys/systm.h>
+#include <sys/cdefs.h>
#include <sys/lock.h>
#include <sys/mutex.h>
#include <sys/rwlock.h>
@@ -84,9 +85,24 @@
struct seqcount_mutex: seqc_write_end \
)(&(s)->seqc)
+static inline void
+lkpi_write_seqcount_invalidate(seqc_t *seqcp)
+{
+ atomic_thread_fence_rel();
+ *seqcp += SEQC_MOD * 2;
+}
+#define write_seqcount_invalidate(s) lkpi_write_seqcount_invalidate(&(s)->seqc)
+
#define read_seqcount_begin(s) seqc_read(&(s)->seqc)
#define raw_read_seqcount(s) seqc_read_any(&(s)->seqc)
+static inline seqc_t
+lkpi_seqprop_sequence(const seqc_t *seqcp)
+{
+ return (atomic_load_int(__DECONST(seqc_t *, seqcp)));
+}
+#define seqprop_sequence(s) lkpi_seqprop_sequence(&(s)->seqc)
+
/*
* XXX: Are predicts from inline functions still not honored by clang?
*/
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Feb 6, 2:18 AM (21 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16485174
Default Alt Text
D42810.diff (1 KB)
Attached To
Mode
D42810: LinuxKPI: Add write_seqcount_invalidate() and seqprop_sequence()
Attached
Detach File
Event Timeline
Log In to Comment