File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 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) {
1940219402
1940319403#else // posix?
1940419404
19405+ #ifndef __USE_GNU
19406+ #define __USE_GNU
19407+ #endif
1940519408#include <sched.h>
1940619409
1940719410static bool __thread_affinity(const bool * mask) {
@@ -19473,17 +19476,16 @@ static bool __thread_priority(int32_t prio) {
1947319476
1947419477#endif
1947519478
19476- #ifdef __aarch64__
19477-
19479+ #if defined(__aarch64__) && ( defined(__clang__) || defined(__GNUC__) )
1947819480static inline void __cpu_relax(void) {
1947919481 __asm__ volatile("yield" ::: "memory");
1948019482}
19481-
19482- #else
19483-
19483+ #elif defined(__x86_64__)
1948419484static inline void __cpu_relax(void) {
19485- __asm__ volatile("rep; nop" ::: "memory" );
19485+ _mm_pause( );
1948619486}
19487+ #else
19488+ static inline void __cpu_relax(void) {;}
1948719489#endif
1948819490
1948919491static 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