From 2753c5176ac4778e8702f48e638b7b7096cacdb8 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Sat, 19 Sep 1998 05:43:12 +0000 Subject: [PATCH] FreeBSD2 has POSIX_THREADS but is missing sched_yield() --- libraries/liblthread/thread.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 */ -- 2.39.5