From 1d9ec3ee5084a9fd9162b9389cb2b13dda21e965 Mon Sep 17 00:00:00 2001 From: Vincenzo Maffione Date: Wed, 5 Dec 2018 15:38:52 +0000 Subject: [PATCH] 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 --- sys/net/netmap.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/netmap.h b/sys/net/netmap.h index 681e50d2b8a9..f3688fc9e919 100644 --- a/sys/net/netmap.h +++ b/sys/net/netmap.h @@ -784,9 +784,10 @@ static inline void nm_stst_barrier(void) #ifdef _KERNEL #define nm_stst_barrier atomic_thread_fence_rel #else /* !_KERNEL */ +#include static inline void nm_stst_barrier(void) { - __atomic_thread_fence(__ATOMIC_RELEASE); + atomic_thread_fence(memory_order_release); } #endif /* !_KERNEL */