From: Jarkko Hietaniemi Date: Mon, 19 Oct 1998 09:15:53 +0000 (+0000) Subject: YIELD more robustly. X-Git-Tag: accepted/trunk/20130322.191538~34817^2~1462 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e7a4f449b8d928b435cf6dc0ee7260fd628fd9e0;p=platform%2Fupstream%2Fperl.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