mirror of
https://github.com/cloudwu/skynet.git
synced 2026-07-24 20:23:06 +00:00
use _mm_pause (#1433)
This commit is contained in:
@@ -53,7 +53,8 @@ spinlock_destroy(struct spinlock *lock) {
|
||||
#define atomic_load_relaxed_(ptr) atomic_load_explicit(ptr, memory_order_relaxed)
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define atomic_pause_() __builtin_ia32_pause()
|
||||
#include <immintrin.h> // For _mm_pause
|
||||
#define atomic_pause_() _mm_pause()
|
||||
#else
|
||||
#define atomic_pause_() ((void)0)
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user