File tree 1 file changed +8
-6
lines changed 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -19402,6 +19402,9 @@ static bool __thread_priority(int32_t prio) {
19402
19402
19403
19403
#else // posix?
19404
19404
19405
+ #ifndef __USE_GNU
19406
+ #define __USE_GNU
19407
+ #endif
19405
19408
#include <sched.h>
19406
19409
19407
19410
static bool __thread_affinity(const bool * mask) {
@@ -19473,17 +19476,16 @@ static bool __thread_priority(int32_t prio) {
19473
19476
19474
19477
#endif
19475
19478
19476
- #ifdef __aarch64__
19477
-
19479
+ #if defined(__aarch64__) && ( defined(__clang__) || defined(__GNUC__) )
19478
19480
static inline void __cpu_relax(void) {
19479
19481
__asm__ volatile("yield" ::: "memory");
19480
19482
}
19481
-
19482
- #else
19483
-
19483
+ #elif defined(__x86_64__)
19484
19484
static inline void __cpu_relax(void) {
19485
- __asm__ volatile("rep; nop" ::: "memory" );
19485
+ _mm_pause( );
19486
19486
}
19487
+ #else
19488
+ static inline void __cpu_relax(void) {;}
19487
19489
#endif
19488
19490
19489
19491
static void __cpumask_next(const bool * global_mask, bool * local_mask, bool strict, int32_t* iter) {
You can’t perform that action at this time.
0 commit comments