From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:43:12 +0000 (+0000) Subject: FreeBSD2 has POSIX_THREADS but is missing sched_yield() X-Git-Tag: PHP3_TOOL_0_0~18^2~97 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=2753c5176ac4778e8702f48e638b7b7096cacdb8;p=openldap FreeBSD2 has POSIX_THREADS but is missing sched_yield() --- diff --git a/libraries/liblthread/thread.c b/libraries/liblthread/thread.c index a0bf1e5f5c..d0a62d5a81 100644 --- a/libraries/liblthread/thread.c +++ b/libraries/liblthread/thread.c @@ -491,15 +491,17 @@ pthread_kill( pthread_t tid, int sig ) #if defined ( POSIX_THREADS ) +#ifdef HAVE_SCHED_YIELD #ifdef HAVE_SCHED_H #include -#endif +#endif /* HAVE_SCHED_H */ /* POSIX Threads (final) does have a pthread_yield function */ void pthread_yield( void ) { sched_yield(); } +#endif /* HAVE_SCHED_YIELD */ #endif /* posix threads */ #endif /* dce pthreads */