mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-01 14:14:56 +00:00
LinuxKPI: Add smp_store_release and smp_load_acquire functions
Sponsored by: Serenity Cyber Security, LLC MFC after: 1 week Reviewed by: manu Differential Revision: https://reviews.freebsd.org/D45611
This commit is contained in:
parent
460908ea55
commit
597ffdc1d3
|
@ -58,4 +58,7 @@
|
|||
#define smp_mb__before_atomic() barrier()
|
||||
#define smp_mb__after_atomic() barrier()
|
||||
|
||||
#define smp_store_release(p, v) do { smp_mb(); WRITE_ONCE(*p, v); } while (0)
|
||||
#define smp_load_acquire(p) ({ typeof(*p) _v = READ_ONCE(*p); smp_mb(); _v; })
|
||||
|
||||
#endif /* _LINUXKPI_ASM_BARRIER_H_ */
|
||||
|
|
Loading…
Reference in a new issue