diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 1998-10-19 09:15:53 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 1998-10-19 09:15:53 +0000 |
commit | e7a4f449b8d928b435cf6dc0ee7260fd628fd9e0 (patch) | |
tree | 1b40ee0ec13cdcc4ef3365bf16c242ece2e0e325 /thread.h | |
parent | 4a07db3e6be903a5c002af0bdc1fe318f4d66315 (diff) | |
download | perl-e7a4f449b8d928b435cf6dc0ee7260fd628fd9e0.tar.gz |
YIELD more robustly.
p4raw-id: //depot/cfgperl@2020
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -25,7 +25,19 @@ #endif #ifndef YIELD -# define YIELD SCHED_YIELD +# ifdef SCHED_YIELD +# define YIELD SCHED_YIELD +# else +# ifdef HAS_SCHED_YIELD +# define YIELD sched_yield() +# else +# ifdef HAS_PTHREAD_YIELD + /* pthread_yield(NULL) platforms are expected + * to have #defined YIELD for themselves. */ +# define YIELD pthread_yield() +# endif +# endif +# endif #endif #ifdef PTHREAD_CREATE_JOINABLE |