hppa: fix loading of global pointer in _start [BZ #20277]
[glibc.git] / sysdeps / nacl / tls.h
blobc56ff37d2f51d6581a6a234f3a884dfe0d71fddc
1 /* Definition for thread-local data handling. NaCl version.
2 Copyright (C) 2015-2016 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 _NACL_TLS_H
20 #define _NACL_TLS_H 1
22 #ifndef __ASSEMBLER__
24 # include <nacl-interfaces.h>
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")
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))
39 #endif /* __ASSEMBLER__ */
41 #endif /* tls.h */