summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-18 19:15:32 +0100
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-03-18 19:15:32 +0100
commit12d1a7cf6b0f94139a5e274d06cabbf725238522 (patch)
treec3050d351db24914e2436c5b11108542cb286930
parent1f04c9e131d45afaed640c1ede5cdb0bab62ada4 (diff)
Remove __need_pthread_mutex / __pthread_mutex_defined
We do not actually use them. * sysdeps/mach/hurd/bits/mutex.h: Always include content. * sysdeps/pthread/bits/mutex.h: Always include content.
-rw-r--r--sysdeps/mach/hurd/bits/mutex.h15
-rw-r--r--sysdeps/pthread/bits/mutex.h27
2 files changed, 10 insertions, 32 deletions
diff --git a/sysdeps/mach/hurd/bits/mutex.h b/sysdeps/mach/hurd/bits/mutex.h
index 4a2dda3..2d5625b 100644
--- a/sysdeps/mach/hurd/bits/mutex.h
+++ b/sysdeps/mach/hurd/bits/mutex.h
@@ -17,17 +17,9 @@
not, see <http://www.gnu.org/licenses/>. */
#ifndef _BITS_MUTEX_H
+#define _BITS_MUTEX_H 1
-#ifndef __need_pthread_mutex
-# define _BITS_MUTEX_H 1
-#endif
-
-#ifndef __pthread_mutex_defined
-# if defined __need_pthread_mutex || defined _BITS_MUTEX_H
-# undef __need_pthread_mutex
-# define __pthread_mutex_defined
-
-# include <bits/mutex-attr.h>
+#include <bits/mutex-attr.h>
/* User visible part of a mutex. */
struct __pthread_mutex
@@ -54,7 +46,4 @@ struct __pthread_mutex
#define __PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
{ 0, 0, 0, 0, __PTHREAD_MUTEX_RECURSIVE + 1, 0, 0, 0 }
-# endif
-#endif /* Not __pthread_mutex_defined. */
-
#endif /* bits/mutex.h */
diff --git a/sysdeps/pthread/bits/mutex.h b/sysdeps/pthread/bits/mutex.h
index 0725046..0a88348 100644
--- a/sysdeps/pthread/bits/mutex.h
+++ b/sysdeps/pthread/bits/mutex.h
@@ -19,18 +19,10 @@
not, see <http://www.gnu.org/licenses/>. */
#ifndef _BITS_MUTEX_H
+#define _BITS_MUTEX_H 1
-#ifndef __need_pthread_mutex
-# define _BITS_MUTEX_H 1
-#endif
-
-#ifndef __pthread_mutex_defined
-# if defined __need_pthread_mutex || defined _BITS_MUTEX_H
-# undef __need_pthread_mutex
-# define __pthread_mutex_defined
-
-# include <bits/spin-lock.h>
-# include <bits/mutex-attr.h>
+#include <bits/spin-lock.h>
+#include <bits/mutex-attr.h>
/* User visible part of a mutex. */
struct __pthread_mutex
@@ -52,22 +44,19 @@ struct __pthread_mutex
/* Initializer for a mutex. N.B. this also happens to be compatible
with the cthread mutex initializer. */
-# define __PTHREAD_MUTEX_INITIALIZER \
+#define __PTHREAD_MUTEX_INITIALIZER \
{ __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0, 0 }
-# define __PTHREAD_ERRORCHECK_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_ERRORCHECK + 1))
+#define __PTHREAD_ERRORCHECK_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_ERRORCHECK + 1))
-# define __PTHREAD_ERRORCHECK_MUTEX_INITIALIZER \
+#define __PTHREAD_ERRORCHECK_MUTEX_INITIALIZER \
{ __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, \
__PTHREAD_ERRORCHECK_MUTEXATTR, 0, 0, 0 }
-# define __PTHREAD_RECURSIVE_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_RECURSIVE + 1))
+#define __PTHREAD_RECURSIVE_MUTEXATTR ((struct __pthread_mutexattr *) ((unsigned long) __PTHREAD_MUTEX_RECURSIVE + 1))
-# define __PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
+#define __PTHREAD_RECURSIVE_MUTEX_INITIALIZER \
{ __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, \
__PTHREAD_RECURSIVE_MUTEXATTR, 0, 0, 0 }
-# endif
-#endif /* Not __pthread_mutex_defined. */
-
#endif /* bits/mutex.h */