FreeBSD2 has POSIX_THREADS but is missing sched_yield()

This commit is contained in:
Kurt Zeilenga 1998-09-19 05:43:12 +00:00
parent 9f1812ce63
commit 2753c5176a

View 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 */