]>
git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/mips/nptl/bits/struct_rwlock.h
1 /* MIPS internal rwlock struct definitions.
2 Copyright (C) 2019-2021 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, see
17 <http://www.gnu.org/licenses/>. */
19 #ifndef _RWLOCK_INTERNAL_H
20 #define _RWLOCK_INTERNAL_H
22 struct __pthread_rwlock_arch_t
24 unsigned int __readers
;
25 unsigned int __writers
;
26 unsigned int __wrphase_futex
;
27 unsigned int __writers_futex
;
30 #if _MIPS_SIM == _ABI64
33 unsigned long int __pad1
;
34 unsigned long int __pad2
;
35 /* FLAGS must stay at this position in the structure to maintain
36 binary compatibility. */
39 # if __BYTE_ORDER == __BIG_ENDIAN
42 unsigned char __shared
;
43 /* FLAGS must stay at this position in the structure to maintain
44 binary compatibility. */
45 unsigned char __flags
;
47 /* FLAGS must stay at this position in the structure to maintain
48 binary compatibility. */
49 unsigned char __flags
;
50 unsigned char __shared
;
58 #if _MIPS_SIM == _ABI64
59 # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
60 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags
62 # if __BYTE_ORDER == __BIG_ENDIAN
63 # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
64 0, 0, 0, 0, 0, 0, 0, 0, 0, __flags, 0
66 # define __PTHREAD_RWLOCK_INITIALIZER(__flags) \
67 0, 0, 0, 0, 0, 0, __flags, 0, 0, 0, 0