mirror of
https://github.com/MariaDB/server.git
synced 2025-01-29 10:14:19 +01:00
os0thread.c Change pthread_yield to sched_yield
univ.i Change pthread_yield to sched_yield configure.in Change pthread_yield to sched_yield
This commit is contained in:
parent
5a5e2be98a
commit
e593714e6b
4 changed files with 9 additions and 3 deletions
|
@ -2,3 +2,4 @@ sasha@mysql.sashanet.com
|
|||
monty@donna.mysql.fi
|
||||
serg@serg.mysql.com
|
||||
jcole@abel.spaceapes.com
|
||||
heikki@donna.mysql.fi
|
||||
|
|
|
@ -7,8 +7,9 @@ AM_INIT_AUTOMAKE(ib, 0.90)
|
|||
AC_PROG_CC
|
||||
AC_PROG_RANLIB
|
||||
AC_PROG_INSTALL
|
||||
AC_CHECK_HEADERS(aio.h)
|
||||
AC_CHECK_HEADERS(aio.h sched.h)
|
||||
AC_CHECK_SIZEOF(int, 4)
|
||||
AC_CHECK_FUNCS(sched_yield)
|
||||
AC_C_INLINE
|
||||
AC_C_BIGENDIAN
|
||||
|
||||
|
|
|
@ -39,6 +39,10 @@ subdirectory of 'mysql'. */
|
|||
/* Include the header file generated by GNU autoconf */
|
||||
#include "../ib_config.h"
|
||||
|
||||
#ifdef HAVE_SCHED_H
|
||||
#include <sched.h>
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_PREAD
|
||||
#define HAVE_PWRITE
|
||||
#endif
|
||||
|
|
|
@ -137,8 +137,8 @@ os_thread_yield(void)
|
|||
{
|
||||
#if defined(__WIN__)
|
||||
Sleep(0);
|
||||
#elif defined(HAVE_PTHREAD_YIELD)
|
||||
pthread_yield();
|
||||
#elif (defined(HAVE_SCHED_YIELD) && defined(HAVE_SCHED_H))
|
||||
sched_yield();
|
||||
#else
|
||||
os_thread_sleep(0);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue