summaryrefslogtreecommitdiff
path: root/thread.h
diff options
context:
space:
mode:
authorAaron Crane <arc@cpan.org>2017-10-14 10:56:37 +0200
committerAaron Crane <arc@cpan.org>2017-10-21 16:53:08 +0100
commitc2844c4f6a1ba1cbf34d6c06f58b8d248562ce50 (patch)
treee2fde7421622976420ef39ab0105f751df1deeb2 /thread.h
parent5026560c306ae1d85252d843f6e0de5860ef9589 (diff)
downloadperl-c2844c4f6a1ba1cbf34d6c06f58b8d248562ce50.tar.gz
thread.h: simplify cpp conditionals
Diffstat (limited to 'thread.h')
-rw-r--r--thread.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/thread.h b/thread.h
index 869d294362..2603d549f5 100644
--- a/thread.h
+++ b/thread.h
@@ -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