mirror of
https://git.FreeBSD.org/src.git
synced 2025-02-07 20:34:22 +00:00
netmap.h: include stdatomic.h
The stdatomic.h header exports atomic_thread_fence(), that can be used to implement the nm_stst_barrier() macro needed by netmap. MFC after: 3 days
This commit is contained in:
parent
0f3b263d83
commit
1d9ec3ee50
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=341589
@ -784,9 +784,10 @@ static inline void nm_stst_barrier(void)
|
||||
#ifdef _KERNEL
|
||||
#define nm_stst_barrier atomic_thread_fence_rel
|
||||
#else /* !_KERNEL */
|
||||
#include <stdatomic.h>
|
||||
static inline void nm_stst_barrier(void)
|
||||
{
|
||||
__atomic_thread_fence(__ATOMIC_RELEASE);
|
||||
atomic_thread_fence(memory_order_release);
|
||||
}
|
||||
#endif /* !_KERNEL */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user