]> git.sur5r.net Git - openldap/commitdiff
FreeBSD2 has POSIX_THREADS but is missing sched_yield()
authorKurt Zeilenga <kurt@openldap.org>
Sat, 19 Sep 1998 05:43:12 +0000 (05:43 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Sat, 19 Sep 1998 05:43:12 +0000 (05:43 +0000)
libraries/liblthread/thread.c

index a0bf1e5f5c9ae38de0e0eddad8f0d37284c98ef3..d0a62d5a815e0c8ae15a51edc13eb9d82f81fb32 100644 (file)
@@ -491,15 +491,17 @@ pthread_kill( pthread_t tid, int sig )
 
 #if defined ( POSIX_THREADS )
 
+#ifdef HAVE_SCHED_YIELD
 #ifdef HAVE_SCHED_H
 #include <sched.h>
-#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 */