summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2023-01-17 23:27:22 +0100
committerSven Gothel <[email protected]>2023-01-17 23:27:22 +0100
commitb9bff3d0cf8396b7c81c9dc3912f5bfc9899191d (patch)
treebde3856668c8485d18f06b38d05807802e367913
parent1d160daf36fee165dc41cf609e3868a08e57af2e (diff)
Linux: Use sched_yield() instead of deprecated pthread_yield()v2.5.0v2.4.0
-rw-r--r--LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp b/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp
index 0d8851b..af5d80b 100644
--- a/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp
+++ b/LibOVRKernel/Src/Kernel/OVR_ThreadsPthread.cpp
@@ -911,10 +911,10 @@ void Thread::YieldCurrentThread()
{
#if defined(OVR_OS_MAC) || defined(OVR_OS_BSD)
pthread_yield_np();
- #elif defined(OVR_OS_ANDROID)
- sched_yield();
+ #elif defined(OVR_OS_ANDROID)
+ sched_yield();
#else // Linux
- pthread_yield();
+ sched_yield();
#endif
}