atomic_queue modifications for windows builds
This commit is contained in:
parent
6b713b11c4
commit
a29f07a27f
1 changed files with 6 additions and 1 deletions
7
src/external/atomic_queue/defs.h
vendored
7
src/external/atomic_queue/defs.h
vendored
|
|
@ -6,7 +6,7 @@
|
|||
|
||||
#include <atomic>
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
#include <emmintrin.h>
|
||||
namespace atomic_queue {
|
||||
constexpr int CACHE_LINE_SIZE = 64;
|
||||
|
|
@ -30,8 +30,13 @@ static inline void spin_loop_pause() noexcept {
|
|||
|
||||
namespace atomic_queue {
|
||||
|
||||
#if defined(__GNUC__)
|
||||
#define ATOMIC_QUEUE_LIKELY(expr) __builtin_expect(static_cast<bool>(expr), 1)
|
||||
#define ATOMIC_QUEUE_UNLIKELY(expr) __builtin_expect(static_cast<bool>(expr), 0)
|
||||
#else
|
||||
#define ATOMIC_QUEUE_LIKELY(expr) expr
|
||||
#define ATOMIC_QUEUE_UNLIKELY(expr) expr
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue