Skip to content
Snippets Groups Projects
Commit 851627df authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Don't use the deprecated pthread_yield() function

Per https://man7.org/linux/man-pages/man3/pthread_yield.3.html
       This call is nonstandard, but present on several other systems.
       Use the standardized sched_yield(2) instead.

Should fix #299.
parent dec14437
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #2445 passed
......@@ -304,8 +304,6 @@ DLLEXPORT int get_errno(void);
#if defined(XPDEV_THREAD_SAFE)
#if defined(__FreeBSD__)
#define MAYBE_YIELD() pthread_yield()
#elif defined(_PTH_PTHREAD_H_)
#define MAYBE_YIELD() pth_yield(NULL)
#elif defined(_POSIX_PRIORITY_SCHEDULING)
#define MAYBE_YIELD() sched_yield()
#else
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment