mirror of
https://git.openldap.org/openldap/openldap.git
synced 2026-01-01 12:39:35 -05:00
FreeBSD2 has POSIX_THREADS but is missing sched_yield()
This commit is contained in:
parent
9f1812ce63
commit
2753c5176a
1 changed files with 3 additions and 1 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Reference in a new issue