]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/unix/sysv/linux/arm/tls.h
Update copyright dates with scripts/update-copyrights
[thirdparty/glibc.git] / sysdeps / unix / sysv / linux / arm / tls.h
1 /* Definition for thread-local data handling. ARM/Linux version.
2 Copyright (C) 2005-2023 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
4
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.
9
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.
14
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 <https://www.gnu.org/licenses/>. */
18
19 #ifndef _LINUX_ARM_TLS_H
20 #define _LINUX_ARM_TLS_H 1
21
22 /* Almost everything is OS-independent and common for all NPTL on ARM. */
23 #include <sysdeps/arm/nptl/tls.h>
24
25 #ifndef __ASSEMBLER__
26
27 /* Get system call information. */
28 # include <sysdep.h>
29
30 /* Code to initially initialize the thread pointer. This might need
31 special attention since 'errno' is not yet available and if the
32 operation can cause a failure 'errno' must not be touched. */
33 # define TLS_INIT_TP(tcbp) \
34 ({ long int result_var; \
35 result_var = INTERNAL_SYSCALL_CALL (set_tls, (tcbp)); \
36 !INTERNAL_SYSCALL_ERROR_P (result_var); })
37
38 #endif /* __ASSEMBLER__ */
39
40 #endif /* tls.h */