mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-20 22:59:34 -05:00
tweak {thr,sched,pthread}_yield() detection
This commit is contained in:
parent
63e7c9e796
commit
85fbd68ed9
2 changed files with 372 additions and 369 deletions
13
configure.in
13
configure.in
|
|
@ -1624,12 +1624,13 @@ int main(argc, argv)
|
|||
pthread_create(&t, NULL, task, NULL);
|
||||
#endif
|
||||
|
||||
#if HAVE_SCHED_YIELD
|
||||
sched_yield(); /* make sure task runs first */
|
||||
#else
|
||||
#ifdef HAVE_PTHREAD_YIELD
|
||||
pthread_yield(); /* make sure task runs first */
|
||||
#endif
|
||||
/* make sure task runs first */
|
||||
#if HAVE_THR_YIELD
|
||||
thr_yield();
|
||||
#elif defined( HAVE_SCHED_YIELD )
|
||||
sched_yield();
|
||||
#elif defined( HAVE_PTHREAD_YIELD )
|
||||
pthread_yield();
|
||||
#endif
|
||||
|
||||
exit(2);
|
||||
|
|
|
|||
Loading…
Reference in a new issue