Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F148970767
D46145.id141408.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
740 B
Referenced Files
None
Subscribers
None
D46145.id141408.diff
View Options
diff --git a/sys/compat/linuxkpi/common/include/linux/compiler.h b/sys/compat/linuxkpi/common/include/linux/compiler.h
--- a/sys/compat/linuxkpi/common/include/linux/compiler.h
+++ b/sys/compat/linuxkpi/common/include/linux/compiler.h
@@ -101,16 +101,18 @@
#define ___PASTE(a,b) a##b
#define __PASTE(a,b) ___PASTE(a,b)
+#define ACCESS_ONCE(x) (*(volatile __typeof(x) *)(uintptr_t)&(x))
+
#define WRITE_ONCE(x,v) do { \
barrier(); \
- (*(volatile __typeof(x) *)(uintptr_t)&(x)) = (v); \
+ ACCESS_ONCE(x) = (v); \
barrier(); \
} while (0)
#define READ_ONCE(x) ({ \
__typeof(x) __var = ({ \
barrier(); \
- (*(const volatile __typeof(x) *)&(x)); \
+ ACCESS_ONCE(x); \
}); \
barrier(); \
__var; \
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Mar 22, 10:19 AM (8 h, 23 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30118643
Default Alt Text
D46145.id141408.diff (740 B)
Attached To
Mode
D46145: linuxkpi: Small tweaks to _ONCE macros
Attached
Detach File
Event Timeline
Log In to Comment