X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=thread.h;h=6141cf3f14a49ad43afe27ea4d5641cd160cc6f3;hb=a14cb26abd9e94e845d7de891545ccdb8fb0fad9;hp=07604f6bcc04922e2a3013e55b4a4562144440cc;hpb=93bce2dcd9a377cf8ad779ab0e9115bcce1265d2;p=p5sagit%2Fp5-mst-13.2.git diff --git a/thread.h b/thread.h index 07604f6..6141cf3 100644 --- a/thread.h +++ b/thread.h @@ -4,6 +4,7 @@ # include #else +#ifndef DJGPP /* POSIXish threads */ #ifdef OLD_PTHREADS_API # define pthread_mutexattr_init(a) pthread_mutexattr_create(a) @@ -22,6 +23,7 @@ # define pthread_condattr_default NULL #endif /* OLD_PTHREADS_API */ #endif +#endif #ifdef PTHREADS_CREATED_JOINABLE # define ATTR_JOINABLE PTHREAD_CREATE_JOINABLE @@ -34,10 +36,12 @@ #endif #ifndef YIELD -# ifdef HAS_PTHREAD_YIELD -# define YIELD pthread_yield() -# else +# ifdef HAS_SCHED_YIELD # define YIELD sched_yield() +# else +# ifdef HAS_PTHREAD_YIELD +# define YIELD pthread_yield() +# endif # endif #endif