diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:01:57 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 19:01:57 +0000 |
commit | cab56836b146bc129f1ad43f0393d95a9deca63a (patch) | |
tree | 4f4e655319bbac78fca170da05275c127429b460 /sysdeps/alpha/nptl | |
parent | 04ac1241a4cd004872282c2c82ec37fa33925292 (diff) | |
parent | 82dd75a7f436a19047325d62182590c9f9e23a78 (diff) |
Merge branch 't/tls' into refs/top-bases/t/tls-threadvar
Diffstat (limited to 'sysdeps/alpha/nptl')
-rw-r--r-- | sysdeps/alpha/nptl/Makefile | 2 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/bits/pthreadtypes-arch.h | 61 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/pthread-offsets.h | 5 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/pthread_spin_lock.S | 2 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/pthread_spin_trylock.S | 2 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/pthreaddef.h | 2 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/tcb-offsets.sym | 1 | ||||
-rw-r--r-- | sysdeps/alpha/nptl/tls.h | 15 |
8 files changed, 73 insertions, 17 deletions
diff --git a/sysdeps/alpha/nptl/Makefile b/sysdeps/alpha/nptl/Makefile index 137b2e565e..8e63e8ad55 100644 --- a/sysdeps/alpha/nptl/Makefile +++ b/sysdeps/alpha/nptl/Makefile @@ -1,4 +1,4 @@ -# Copyright (C) 2003-2016 Free Software Foundation, Inc. +# Copyright (C) 2003-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 diff --git a/sysdeps/alpha/nptl/bits/pthreadtypes-arch.h b/sysdeps/alpha/nptl/bits/pthreadtypes-arch.h new file mode 100644 index 0000000000..1ea7f4e4cf --- /dev/null +++ b/sysdeps/alpha/nptl/bits/pthreadtypes-arch.h @@ -0,0 +1,61 @@ +/* Machine-specific pthread type layouts. Alpha version. + Copyright (C) 2003-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 Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with the GNU C Library. If not, see + <http://www.gnu.org/licenses/>. */ + +#ifndef _BITS_PTHREADTYPES_ARCH_H +#define _BITS_PTHREADTYPES_ARCH_H 1 + +#define __SIZEOF_PTHREAD_ATTR_T 56 +#define __SIZEOF_PTHREAD_MUTEX_T 40 +#define __SIZEOF_PTHREAD_MUTEXATTR_T 4 +#define __SIZEOF_PTHREAD_COND_T 48 +#define __SIZEOF_PTHREAD_CONDATTR_T 4 +#define __SIZEOF_PTHREAD_RWLOCK_T 56 +#define __SIZEOF_PTHREAD_RWLOCKATTR_T 8 +#define __SIZEOF_PTHREAD_BARRIER_T 32 +#define __SIZEOF_PTHREAD_BARRIERATTR_T 4 + +/* Definitions for internal mutex struct. */ +#define __PTHREAD_COMPAT_PADDING_MID +#define __PTHREAD_COMPAT_PADDING_END +#define __PTHREAD_MUTEX_LOCK_ELISION 0 +#define __PTHREAD_MUTEX_NUSERS_AFTER_KIND 0 +#define __PTHREAD_MUTEX_USE_UNION 0 + +#define __LOCK_ALIGNMENT +#define __ONCE_ALIGNMENT + +struct __pthread_rwlock_arch_t +{ + unsigned int __readers; + unsigned int __writers; + unsigned int __wrphase_futex; + unsigned int __writers_futex; + unsigned int __pad3; + unsigned int __pad4; + int __cur_writer; + int __shared; + unsigned long int __pad1; + unsigned long int __pad2; + /* FLAGS must stay at this position in the structure to maintain + binary compatibility. */ + unsigned int __flags; +}; + +#define __PTHREAD_RWLOCK_ELISION_EXTRA 0 + +#endif /* bits/pthreadtypes.h */ diff --git a/sysdeps/alpha/nptl/pthread-offsets.h b/sysdeps/alpha/nptl/pthread-offsets.h new file mode 100644 index 0000000000..16c6b0d9fd --- /dev/null +++ b/sysdeps/alpha/nptl/pthread-offsets.h @@ -0,0 +1,5 @@ +#define __PTHREAD_MUTEX_NUSERS_OFFSET 12 +#define __PTHREAD_MUTEX_KIND_OFFSET 16 +#define __PTHREAD_MUTEX_SPINS_OFFSET 20 +#define __PTHREAD_MUTEX_ELISION_OFFSET 22 +#define __PTHREAD_MUTEX_LIST_OFFSET 24 diff --git a/sysdeps/alpha/nptl/pthread_spin_lock.S b/sysdeps/alpha/nptl/pthread_spin_lock.S index 6d132777a3..3ca52184d1 100644 --- a/sysdeps/alpha/nptl/pthread_spin_lock.S +++ b/sysdeps/alpha/nptl/pthread_spin_lock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2016 Free Software Foundation, Inc. +/* Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <rth@twiddle.net>, 2003. diff --git a/sysdeps/alpha/nptl/pthread_spin_trylock.S b/sysdeps/alpha/nptl/pthread_spin_trylock.S index 55d179c506..bac54339a2 100644 --- a/sysdeps/alpha/nptl/pthread_spin_trylock.S +++ b/sysdeps/alpha/nptl/pthread_spin_trylock.S @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2016 Free Software Foundation, Inc. +/* Copyright (C) 2003-2018 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Richard Henderson <rth@twiddle.net>, 2003. diff --git a/sysdeps/alpha/nptl/pthreaddef.h b/sysdeps/alpha/nptl/pthreaddef.h index c3d760ba1e..f505583600 100644 --- a/sysdeps/alpha/nptl/pthreaddef.h +++ b/sysdeps/alpha/nptl/pthreaddef.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003-2016 Free Software Foundation, Inc. +/* Copyright (C) 2003-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 diff --git a/sysdeps/alpha/nptl/tcb-offsets.sym b/sysdeps/alpha/nptl/tcb-offsets.sym index c21a791040..1005621b37 100644 --- a/sysdeps/alpha/nptl/tcb-offsets.sym +++ b/sysdeps/alpha/nptl/tcb-offsets.sym @@ -10,5 +10,4 @@ #define thread_offsetof(mem) (long)(offsetof(struct pthread, mem) - sizeof(struct pthread)) MULTIPLE_THREADS_OFFSET thread_offsetof (header.multiple_threads) -PID_OFFSET thread_offsetof (pid) TID_OFFSET thread_offsetof (tid) diff --git a/sysdeps/alpha/nptl/tls.h b/sysdeps/alpha/nptl/tls.h index 90d98e124d..482c8f855c 100644 --- a/sysdeps/alpha/nptl/tls.h +++ b/sysdeps/alpha/nptl/tls.h @@ -1,5 +1,5 @@ /* Definition for thread-local data handling. NPTL/Alpha version. - Copyright (C) 2003-2016 Free Software Foundation, Inc. + Copyright (C) 2003-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 @@ -25,17 +25,7 @@ # include <stdbool.h> # include <stddef.h> # include <stdint.h> - -/* Type for the dtv. */ -typedef union dtv -{ - size_t counter; - struct - { - void *val; - bool is_static; - } pointer; -} dtv_t; +# include <dl-dtv.h> /* Get system call information. */ # include <sysdep.h> @@ -113,6 +103,7 @@ typedef struct descr->member[idx] = (value) /* Get and set the global scope generation counter in struct pthread. */ +#define THREAD_GSCOPE_IN_TCB 1 #define THREAD_GSCOPE_FLAG_UNUSED 0 #define THREAD_GSCOPE_FLAG_USED 1 #define THREAD_GSCOPE_FLAG_WAIT 2 |