From c2597197898e29c85dbfd5a10fb05c2428d2ac07 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Mar 2018 02:23:31 +0100 Subject: Move bits/mutex-attr.h to bits/types/struct___pthread_mutexattr.h * sysdeps/pthread/bits/mutex-attr.h: Move file to... * sysdeps/pthread/bits/types/struct___pthread_mutexattr.h: ... here. * Makefile (headers): Update accordingly. * sysdeps/generic/pthread.h: Likewise. * sysdeps/mach/hurd/bits/types/struct___pthread_mutex.h: Likewise. * sysdeps/pthread/bits/pthreadtypes.h: Likewise. * sysdeps/pthread/bits/types/struct___pthread_mutex.h: Likewise. --- Makefile | 2 +- sysdeps/generic/pthread.h | 2 +- .../mach/hurd/bits/types/struct___pthread_mutex.h | 2 +- sysdeps/pthread/bits/mutex-attr.h | 40 ---------------------- sysdeps/pthread/bits/pthreadtypes.h | 2 +- .../pthread/bits/types/struct___pthread_mutex.h | 2 +- .../bits/types/struct___pthread_mutexattr.h | 40 ++++++++++++++++++++++ 7 files changed, 45 insertions(+), 45 deletions(-) delete mode 100644 sysdeps/pthread/bits/mutex-attr.h create mode 100644 sysdeps/pthread/bits/types/struct___pthread_mutexattr.h diff --git a/Makefile b/Makefile index 684a612..d47900e 100644 --- a/Makefile +++ b/Makefile @@ -159,7 +159,7 @@ headers := \ bits/types/struct___pthread_barrier.h \ bits/thread-specific.h \ bits/once.h \ - bits/mutex-attr.h \ + bits/types/struct___pthread_mutexattr.h \ bits/rwlock.h \ bits/rwlock-attr.h \ bits/semaphore.h diff --git a/sysdeps/generic/pthread.h b/sysdeps/generic/pthread.h index 9603aec..b06bf8b 100644 --- a/sysdeps/generic/pthread.h +++ b/sysdeps/generic/pthread.h @@ -274,7 +274,7 @@ extern pthread_t pthread_self (void) __THROW; #define PTHREAD_MUTEX_ROBUST __PTHREAD_MUTEX_ROBUST #endif -#include +#include /* Initialize the mutex attribute object in *ATTR to the default values. */ diff --git a/sysdeps/mach/hurd/bits/types/struct___pthread_mutex.h b/sysdeps/mach/hurd/bits/types/struct___pthread_mutex.h index c6d356d..4fe87cc 100644 --- a/sysdeps/mach/hurd/bits/types/struct___pthread_mutex.h +++ b/sysdeps/mach/hurd/bits/types/struct___pthread_mutex.h @@ -19,7 +19,7 @@ #ifndef _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H #define _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H 1 -#include +#include /* User visible part of a mutex. */ struct __pthread_mutex diff --git a/sysdeps/pthread/bits/mutex-attr.h b/sysdeps/pthread/bits/mutex-attr.h deleted file mode 100644 index 0c3d91a..0000000 --- a/sysdeps/pthread/bits/mutex-attr.h +++ /dev/null @@ -1,40 +0,0 @@ -/* Mutex attribute type. Generic version. - Copyright (C) 2002-2018 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C Library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - The GNU C Library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with the GNU C Library; see the file COPYING.LIB. If - not, see . */ - -#ifndef _BITS_MUTEX_ATTR_H -#define _BITS_MUTEX_ATTR_H 1 - -enum __pthread_mutex_protocol; -enum __pthread_process_shared; -enum __pthread_mutex_type; - -/* This structure describes the attributes of a POSIX mutex - attribute. */ -struct __pthread_mutexattr -{ - int __prioceiling; - enum __pthread_mutex_protocol __protocol; - enum __pthread_process_shared __pshared; - enum __pthread_mutex_type __mutex_type; -}; - -/* Attributes for a recursive mutex. */ -extern const struct __pthread_mutexattr __pthread_errorcheck_mutexattr; -extern const struct __pthread_mutexattr __pthread_recursive_mutexattr; - -#endif /* bits/mutex-attr.h */ diff --git a/sysdeps/pthread/bits/pthreadtypes.h b/sysdeps/pthread/bits/pthreadtypes.h index 59ab32a..eeb4269 100644 --- a/sysdeps/pthread/bits/pthreadtypes.h +++ b/sysdeps/pthread/bits/pthreadtypes.h @@ -85,7 +85,7 @@ enum __pthread_mutex_robustness __PTHREAD_MUTEX_ROBUST = 0x100 }; -#include +#include typedef struct __pthread_mutexattr pthread_mutexattr_t; #include diff --git a/sysdeps/pthread/bits/types/struct___pthread_mutex.h b/sysdeps/pthread/bits/types/struct___pthread_mutex.h index a9265c4..64b1c8c 100644 --- a/sysdeps/pthread/bits/types/struct___pthread_mutex.h +++ b/sysdeps/pthread/bits/types/struct___pthread_mutex.h @@ -22,7 +22,7 @@ #define _BITS_TYPES_STRUCT___PTHREAD_MUTEX_H 1 #include -#include +#include /* User visible part of a mutex. */ struct __pthread_mutex diff --git a/sysdeps/pthread/bits/types/struct___pthread_mutexattr.h b/sysdeps/pthread/bits/types/struct___pthread_mutexattr.h new file mode 100644 index 0000000..c77458a --- /dev/null +++ b/sysdeps/pthread/bits/types/struct___pthread_mutexattr.h @@ -0,0 +1,40 @@ +/* Mutex attribute type. Generic version. + Copyright (C) 2002-2018 Free Software Foundation, Inc. + This file is part of the GNU C Library. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If + not, see . */ + +#ifndef _BITS_TYPES_STRUCT___PTHREAD_MUTEXATTR_H +#define _BITS_TYPES_STRUCT___PTHREAD_MUTEXATTR_H 1 + +enum __pthread_mutex_protocol; +enum __pthread_process_shared; +enum __pthread_mutex_type; + +/* This structure describes the attributes of a POSIX mutex + attribute. */ +struct __pthread_mutexattr +{ + int __prioceiling; + enum __pthread_mutex_protocol __protocol; + enum __pthread_process_shared __pshared; + enum __pthread_mutex_type __mutex_type; +}; + +/* Attributes for a recursive mutex. */ +extern const struct __pthread_mutexattr __pthread_errorcheck_mutexattr; +extern const struct __pthread_mutexattr __pthread_recursive_mutexattr; + +#endif /* bits/types/struct___pthread_mutexattr.h */ -- cgit v1.2.3