Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F140970089
D42810.id130695.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
988 B
Referenced Files
None
Subscribers
None
D42810.id130695.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
@@ -36,6 +36,8 @@
#include <sys/rwlock.h>
#include <sys/seqc.h>
+#include <linux/compiler.h>
+
struct lock_class_key;
struct seqcount {
@@ -84,6 +86,13 @@
struct seqcount_mutex: seqc_write_end \
)(&(s)->seqc)
+static inline void
+write_seqcount_invalidate(struct seqcount_mutex *seqcount)
+{
+ atomic_thread_fence_rel();
+ seqcount->seqc += 2;
+}
+
#define read_seqcount_begin(s) seqc_read(&(s)->seqc)
#define raw_read_seqcount(s) seqc_read_any(&(s)->seqc)
@@ -165,4 +174,10 @@
#define read_seqretry(seqlock, gen) \
read_seqcount_retry(&(seqlock)->seql_count, gen)
+static inline unsigned
+seqprop_sequence(const seqcount_mutex_t *seqcount)
+{
+ return READ_ONCE(seqcount->seqc);
+}
+
#endif /* _LINUXKPI_LINUX_SEQLOCK_H__ */
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Wed, Dec 31, 6:05 AM (13 h, 44 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
27403989
Default Alt Text
D42810.id130695.diff (988 B)
Attached To
Mode
D42810: LinuxKPI: Add write_seqcount_invalidate() and seqprop_sequence()
Attached
Detach File
Event Timeline
Log In to Comment