]> git.ipfire.org Git - thirdparty/glibc.git/blob - sysdeps/nacl/tls.h
Update copyright dates with scripts/update-copyrights.
[thirdparty/glibc.git] / sysdeps / nacl / tls.h
1 /* Definition for thread-local data handling. NaCl version.
2 Copyright (C) 2015-2017 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 <http://www.gnu.org/licenses/>. */
18
19 #ifndef _NACL_TLS_H
20 #define _NACL_TLS_H 1
21
22 #ifndef __ASSEMBLER__
23
24 # include <nacl-interfaces.h>
25
26 /* Code to initially initialize the thread pointer. This might need
27 special attention since 'errno' is not yet available and if the
28 operation can cause a failure 'errno' must not be touched. */
29 # define TLS_INIT_TP(tcbp) \
30 ((*__nacl_irt_tls.tls_init) (tcbp) == 0 ? NULL : "tls_init call failed")
31
32 /* Our use of dl_sysinfo is rather different from the Linux syscall
33 entry-point case. We never need a thread-local copy of the value. */
34 # undef SETUP_THREAD_SYSINFO
35 # undef CHECK_THREAD_SYSINFO
36 # define SETUP_THREAD_SYSINFO(pd) ((void) (pd))
37 # define CHECK_THREAD_SYSINFO(pd) ((void) (pd))
38
39 #endif /* __ASSEMBLER__ */
40
41 #endif /* tls.h */