From 164f0e35665764e6d0d03213c07d3998c6538567 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 19 Mar 2018 02:30:53 +0100 Subject: Move bits/rwlock.h to bits/types/struct___pthread_rwlock.h * sysdeps/pthread/bits/rwlock.h: Move file to... * sysdeps/pthread/bits/types/struct___pthread_rwlock.h: ... here. * Makefile (headers): Update accordingly. * sysdeps/generic/pthread.h: Likewise. * sysdeps/pthread/bits/pthreadtypes.h: Likewise. --- sysdeps/pthread/bits/pthreadtypes.h | 2 +- sysdeps/pthread/bits/rwlock.h | 45 ---------------------- .../pthread/bits/types/struct___pthread_rwlock.h | 45 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 46 deletions(-) delete mode 100644 sysdeps/pthread/bits/rwlock.h create mode 100644 sysdeps/pthread/bits/types/struct___pthread_rwlock.h (limited to 'sysdeps/pthread/bits') diff --git a/sysdeps/pthread/bits/pthreadtypes.h b/sysdeps/pthread/bits/pthreadtypes.h index c74face..1ff4996 100644 --- a/sysdeps/pthread/bits/pthreadtypes.h +++ b/sysdeps/pthread/bits/pthreadtypes.h @@ -107,7 +107,7 @@ typedef __pthread_spinlock_t pthread_spinlock_t; #include typedef struct __pthread_rwlockattr pthread_rwlockattr_t; -#include +#include typedef struct __pthread_rwlock pthread_rwlock_t; #endif /* __USE_UNIX98 || __USE_XOPEN2K */ diff --git a/sysdeps/pthread/bits/rwlock.h b/sysdeps/pthread/bits/rwlock.h deleted file mode 100644 index 8fee357..0000000 --- a/sysdeps/pthread/bits/rwlock.h +++ /dev/null @@ -1,45 +0,0 @@ -/* rwlock 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_RWLOCK_H -#define _BITS_RWLOCK_H - -#include - -/* User visible part of a rwlock. If __held is not held and readers - is 0, then the lock is unlocked. If __held is held and readers is - 0, then the lock is held by a writer. If __held is held and - readers is greater than 0, then the lock is held by READERS - readers. */ -struct __pthread_rwlock - { - __pthread_spinlock_t __held; - __pthread_spinlock_t __lock; - int __readers; - struct __pthread *__readerqueue; - struct __pthread *__writerqueue; - struct __pthread_rwlockattr *__attr; - void *__data; - }; - -/* Initializer for a rwlock. */ -#define __PTHREAD_RWLOCK_INITIALIZER \ - { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 } - - -#endif /* bits/rwlock.h */ diff --git a/sysdeps/pthread/bits/types/struct___pthread_rwlock.h b/sysdeps/pthread/bits/types/struct___pthread_rwlock.h new file mode 100644 index 0000000..3459e48 --- /dev/null +++ b/sysdeps/pthread/bits/types/struct___pthread_rwlock.h @@ -0,0 +1,45 @@ +/* rwlock 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_RWLOCK_H +#define _BITS_TYPES_STRUCT___PTHREAD_RWLOCK_H + +#include + +/* User visible part of a rwlock. If __held is not held and readers + is 0, then the lock is unlocked. If __held is held and readers is + 0, then the lock is held by a writer. If __held is held and + readers is greater than 0, then the lock is held by READERS + readers. */ +struct __pthread_rwlock + { + __pthread_spinlock_t __held; + __pthread_spinlock_t __lock; + int __readers; + struct __pthread *__readerqueue; + struct __pthread *__writerqueue; + struct __pthread_rwlockattr *__attr; + void *__data; + }; + +/* Initializer for a rwlock. */ +#define __PTHREAD_RWLOCK_INITIALIZER \ + { __PTHREAD_SPIN_LOCK_INITIALIZER, __PTHREAD_SPIN_LOCK_INITIALIZER, 0, 0, 0, 0, 0 } + + +#endif /* bits/types/struct___pthread_rwlock.h */ -- cgit v1.2.3