diff options
author | Aaron Crane <arc@cpan.org> | 2017-10-14 10:56:37 +0200 |
---|---|---|
committer | Aaron Crane <arc@cpan.org> | 2017-10-21 16:53:08 +0100 |
commit | c2844c4f6a1ba1cbf34d6c06f58b8d248562ce50 (patch) | |
tree | e2fde7421622976420ef39ab0105f751df1deeb2 /thread.h | |
parent | 5026560c306ae1d85252d843f6e0de5860ef9589 (diff) | |
download | perl-c2844c4f6a1ba1cbf34d6c06f58b8d248562ce50.tar.gz |
thread.h: simplify cpp conditionals
Diffstat (limited to 'thread.h')
-rw-r--r-- | thread.h | 16 |
1 files changed, 5 insertions, 11 deletions
@@ -16,8 +16,7 @@ #ifdef WIN32 # include <win32thread.h> -#else -#ifdef NETWARE +#elif defined(NETWARE) # include <nw5thread.h> #else # ifdef OLD_PTHREADS_API /* Here be dragons. */ @@ -71,7 +70,6 @@ # define pthread_mutexattr_default NULL # define pthread_condattr_default NULL # endif -#endif /* NETWARE */ #endif #ifndef PTHREAD_CREATE @@ -169,16 +167,12 @@ #ifndef YIELD # ifdef SCHED_YIELD # define YIELD SCHED_YIELD -# else -# ifdef HAS_SCHED_YIELD -# define YIELD sched_yield() -# else -# ifdef HAS_PTHREAD_YIELD +# elif defined(HAS_SCHED_YIELD) +# define YIELD sched_yield() +# elif defined(HAS_PTHREAD_YIELD) /* pthread_yield(NULL) platforms are expected * to have #defined YIELD for themselves. */ -# define YIELD pthread_yield() -# endif -# endif +# define YIELD pthread_yield() # endif #endif |