From: Jarkko Hietaniemi Date: Mon, 19 Oct 1998 09:15:53 +0000 (+0000) Subject: YIELD more robustly. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e7a4f449b8d928b435cf6dc0ee7260fd628fd9e0;p=p5sagit%2Fp5-mst-13.2.git YIELD more robustly. p4raw-id: //depot/cfgperl@2020 --- diff --git a/thread.h b/thread.h index f883ced..dafaa1e 100644 --- a/thread.h +++ b/thread.h @@ -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