summaryrefslogtreecommitdiff
path: root/innobase/os/os0thread.c
diff options
context:
space:
mode:
Diffstat (limited to 'innobase/os/os0thread.c')
-rw-r--r--innobase/os/os0thread.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c
index 9185542e0aa..05e1e6201a4 100644
--- a/innobase/os/os0thread.c
+++ b/innobase/os/os0thread.c
@@ -135,10 +135,12 @@ void
os_thread_yield(void)
/*=================*/
{
-#ifdef __WIN__
+#if defined(__WIN__)
Sleep(0);
+#elif (defined(HAVE_SCHED_YIELD) && defined(HAVE_SCHED_H))
+ sched_yield();
#else
- pthread_yield();
+ os_thread_sleep(0);
#endif
}