From 12d1a7cf6b0f94139a5e274d06cabbf725238522 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Sun, 18 Mar 2018 19:15:32 +0100 Subject: 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. --- sysdeps/pthread/bits/mutex.h | 27 ++++++++------------------- 1 file changed, 8 insertions(+), 19 deletions(-) (limited to 'sysdeps/pthread/bits') 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 . */ #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 -# include +#include +#include /* 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 */ -- cgit v1.2.3