We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8240eff commit e8da260Copy full SHA for e8da260
src/utils.h
@@ -77,7 +77,9 @@ static inline void *xrealloc(void *ptr, size_t size)
77
|| defined(__ARM_ARCH_7S__) || defined(__aarch64__)
78
#define brubeck_cpu_relax() __asm__ volatile("yield\n": : :"memory")
79
#else
80
-#define brubeck_cpu_relax() break
+/* Many OSes support it, but some require odd macros to get the declaration */
81
+int pthread_yield(void);
82
+#define brubeck_cpu_relax() pthread_yield ()
83
#endif
84
85
void initproctitle (int argc, char **argv);
0 commit comments