aboutsummaryrefslogtreecommitdiffstats
path: root/community/virtualbox-guest-additions/musl-sched_yield.patch
blob: b3012e5c1a179e47096851316f9bb1598cca38d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
--- ./src/VBox/Runtime/r3/posix/thread2-posix.cpp.orig
+++ ./src/VBox/Runtime/r3/posix/thread2-posix.cpp
@@ -63,7 +63,7 @@
 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
         sched_yield();
 #else
-        if (!pthread_yield())
+        if (!sched_yield())
 #endif
         {
             LogFlow(("RTThreadSleep: returning %Rrc (cMillies=%d)\n", VINF_SUCCESS, cMillies));
@@ -100,7 +100,7 @@
 #elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
         sched_yield();
 #else
-        if (!pthread_yield())
+        if (!sched_yield())
 #endif
             return VINF_SUCCESS;
     }
@@ -126,10 +126,8 @@
 #endif
 #ifdef RT_OS_DARWIN
     pthread_yield_np();
-#elif defined(RT_OS_SOLARIS) || defined(RT_OS_HAIKU) || defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD)
-    sched_yield();
 #else
-    pthread_yield();
+    sched_yield();
 #endif
 #if defined(RT_ARCH_AMD64) || defined(RT_ARCH_X86)
     u64TS = ASMReadTSC() - u64TS;