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:
Vincenzo Maffione 2018-12-05 15:38:52 +00:00
parent 0f3b263d83
commit 1d9ec3ee50

View File

@ -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 */