mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-21 15:19: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);
|
pthread_create(&t, NULL, task, NULL);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if HAVE_SCHED_YIELD
|
/* make sure task runs first */
|
||||||
sched_yield(); /* make sure task runs first */
|
#if HAVE_THR_YIELD
|
||||||
#else
|
thr_yield();
|
||||||
#ifdef HAVE_PTHREAD_YIELD
|
#elif defined( HAVE_SCHED_YIELD )
|
||||||
pthread_yield(); /* make sure task runs first */
|
sched_yield();
|
||||||
#endif
|
#elif defined( HAVE_PTHREAD_YIELD )
|
||||||
|
pthread_yield();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
exit(2);
|
exit(2);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue