diff options
-rw-r--r-- | sysdeps/mach/hurd/bits/mutex.h | 15 | ||||
-rw-r--r-- | sysdeps/pthread/bits/mutex.h | 27 |
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 */ |