mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
ITS#3950 tweak prev commit, s/REPLACE_SCHED_YIELD/REPLACE_BROKEN_YIELD/
This commit is contained in:
parent
f5fd375d38
commit
d1693d4a07
4 changed files with 14 additions and 14 deletions
10
configure
vendored
10
configure
vendored
|
|
@ -1,5 +1,5 @@
|
||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.614 2006/01/06 04:41:42 kurt Exp .
|
# From configure.in OpenLDAP: pkg/ldap/configure.in,v 1.615 2006/01/06 04:50:53 kurt Exp .
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.59.
|
# Generated by GNU Autoconf 2.59.
|
||||||
#
|
#
|
||||||
|
|
@ -24743,17 +24743,17 @@ echo "$as_me: error: pthread_create is not usable, check environment settings" >
|
||||||
{ (exit 1); exit 1; }; }
|
{ (exit 1); exit 1; }; }
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ol_replace_sched_yield=no
|
ol_replace_broken_yield=no
|
||||||
case "$target" in
|
case "$target" in
|
||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
ol_replace_sched_yield=yes
|
ol_replace_broken_yield=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test $ol_replace_sched_yield = yes ; then
|
if test $ol_replace_broken_yield = yes ; then
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<\_ACEOF
|
||||||
#define REPLACE_SCHED_YIELD 1
|
#define REPLACE_BROKEN_YIELD 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
|
||||||
10
configure.in
10
configure.in
|
|
@ -1587,16 +1587,16 @@ dnl [ol_cv_pthread_lpthread_lexc])
|
||||||
AC_MSG_ERROR([pthread_create is not usable, check environment settings])
|
AC_MSG_ERROR([pthread_create is not usable, check environment settings])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ol_replace_sched_yield=no
|
ol_replace_broken_yield=no
|
||||||
case "$target" in
|
case "$target" in
|
||||||
*-*-linux*)
|
*-*-linux*)
|
||||||
ol_replace_sched_yield=yes
|
ol_replace_broken_yield=yes
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if test $ol_replace_sched_yield = yes ; then
|
if test $ol_replace_broken_yield = yes ; then
|
||||||
AC_DEFINE([REPLACE_SCHED_YIELD],1,
|
AC_DEFINE([REPLACE_BROKEN_YIELD],1,
|
||||||
[define to replace sched_yield(2)])
|
[define if sched_yield yields the entire process])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Check if select causes an yield
|
dnl Check if select causes an yield
|
||||||
|
|
|
||||||
|
|
@ -912,8 +912,8 @@
|
||||||
/* Define to the version of this package. */
|
/* Define to the version of this package. */
|
||||||
#undef PACKAGE_VERSION
|
#undef PACKAGE_VERSION
|
||||||
|
|
||||||
/* define to replace sched_yield(2) */
|
/* define if sched_yield yields the entire process */
|
||||||
#undef REPLACE_SCHED_YIELD
|
#undef REPLACE_BROKEN_YIELD
|
||||||
|
|
||||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||||
#undef RETSIGTYPE
|
#undef RETSIGTYPE
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
|
|
||||||
#include <ac/errno.h>
|
#include <ac/errno.h>
|
||||||
|
|
||||||
#ifdef REPLACE_SCHED_YIELD
|
#ifdef REPLACE_BROKEN_YIELD
|
||||||
#ifndef HAVE_NANOSLEEP
|
#ifndef HAVE_NANOSLEEP
|
||||||
#include <ac/socket.h>
|
#include <ac/socket.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -214,7 +214,7 @@ ldap_pvt_thread_kill( ldap_pvt_thread_t thread, int signo )
|
||||||
int
|
int
|
||||||
ldap_pvt_thread_yield( void )
|
ldap_pvt_thread_yield( void )
|
||||||
{
|
{
|
||||||
#ifdef REPLACE_SCHED_YIELD
|
#ifdef REPLACE_BROKEN_YIELD
|
||||||
#ifdef HAVE_NANOSLEEP
|
#ifdef HAVE_NANOSLEEP
|
||||||
struct timespec t = { 0, 0 };
|
struct timespec t = { 0, 0 };
|
||||||
nanosleep(&t, NULL);
|
nanosleep(&t, NULL);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue