From c8466a0c51422c6a63009a7220137ca8c4ae1a79 Mon Sep 17 00:00:00 2001 From: SoundBot Date: Wed, 19 Jan 2022 14:53:31 -0500 Subject: Replace deprecated pthread_yield with sched_yield Since glibc 2.34, pthread_yield is nonstandard and marked as deprecated. See: https://man7.org/linux/man-pages/man3/pthread_yield.3.html --- src/threading.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/threading.h b/src/threading.h index 9761f82..778b6a0 100644 --- a/src/threading.h +++ b/src/threading.h @@ -147,7 +147,7 @@ enum e_status { PENDING, RUNNING, WAITING, DONE, ERROR_ST, CANCELLED }; // for some reason win32-pthread doesn't have pthread_yield(), but sched_yield() #define YIELD() sched_yield() #else - #define YIELD() pthread_yield() + #define YIELD() sched_yield() #endif #define THREAD_CALLCONV #endif //THREADAPI == THREADAPI_PTHREAD -- cgit v1.2.3-55-g6feb