Blame sysdeps/generic/tls.h

Packit Service 82fcde
/* Definition for thread-local data handling.  Generic version.
Packit Service 82fcde
   Copyright (C) 2002-2018 Free Software Foundation, Inc.
Packit Service 82fcde
   This file is part of the GNU C Library.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is free software; you can redistribute it and/or
Packit Service 82fcde
   modify it under the terms of the GNU Lesser General Public
Packit Service 82fcde
   License as published by the Free Software Foundation; either
Packit Service 82fcde
   version 2.1 of the License, or (at your option) any later version.
Packit Service 82fcde
Packit Service 82fcde
   The GNU C Library is distributed in the hope that it will be useful,
Packit Service 82fcde
   but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 82fcde
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Packit Service 82fcde
   Lesser General Public License for more details.
Packit Service 82fcde
Packit Service 82fcde
   You should have received a copy of the GNU Lesser General Public
Packit Service 82fcde
   License along with the GNU C Library; if not, see
Packit Service 82fcde
   <http://www.gnu.org/licenses/>.  */
Packit Service 82fcde
Packit Service 82fcde
/* An architecture-specific version of this file has to defined a
Packit Service 82fcde
   number of symbols:
Packit Service 82fcde
Packit Service 82fcde
     TLS_TCB_AT_TP  or  TLS_DTV_AT_TP
Packit Service 82fcde
Packit Service 82fcde
     The presence of one of these symbols signals which variant of
Packit Service 82fcde
     the TLS ABI is used.  There are in the moment two variants
Packit Service 82fcde
     available:
Packit Service 82fcde
Packit Service 82fcde
     * the thread pointer points to a thread control block
Packit Service 82fcde
Packit Service 82fcde
     * the thread pointer points to the dynamic thread vector
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     TLS_TCB_SIZE
Packit Service 82fcde
Packit Service 82fcde
     This is the size of the thread control block structure.  How
Packit Service 82fcde
     this is actually defined depends on the ABI.  The thread control
Packit Service 82fcde
     block could be internal descriptor of the thread library or
Packit Service 82fcde
     just a data structure which allows finding the DTV.
Packit Service 82fcde
Packit Service 82fcde
     TLS_INIT_TCB_SIZE
Packit Service 82fcde
Packit Service 82fcde
     Similarly, but this value is only used at startup and in the
Packit Service 82fcde
     dynamic linker itself.  There are no threads in use at that time.
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     TLS_TCB_ALIGN
Packit Service 82fcde
Packit Service 82fcde
     Alignment requirements for the TCB structure.
Packit Service 82fcde
Packit Service 82fcde
     TLS_INIT_TCB_ALIGN
Packit Service 82fcde
Packit Service 82fcde
     Similarly, but for the structure used at startup time.
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     INSTALL_DTV(tcb, init_dtv)
Packit Service 82fcde
Packit Service 82fcde
     This macro must install the given initial DTV into the thread control
Packit Service 82fcde
     block TCB.  The normal runtime functionality must then be able to
Packit Service 82fcde
     use the value.
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     TLS_INIT_TP(tcb)
Packit Service 82fcde
Packit Service 82fcde
     This macro must initialize the thread pointer to enable normal TLS
Packit Service 82fcde
     operation.  The parameter is a pointer to the thread control block.
Packit Service 82fcde
     ld.so calls this macro once.
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     THREAD_DTV()
Packit Service 82fcde
Packit Service 82fcde
     This macro returns the address of the DTV of the current thread.
Packit Service 82fcde
     This normally is done using the thread register which points
Packit Service 82fcde
     to the dtv or the TCB (from which the DTV can found).
Packit Service 82fcde
Packit Service 82fcde
Packit Service 82fcde
     THREAD_GSCOPE_IN_TCB
Packit Service 82fcde
Packit Service 82fcde
     This should be set to 1 if the global scope flag is stored within the TCB.
Packit Service 82fcde
     When set to 0, GL(_dl_thread_gscope_count) will be defined to store it.
Packit Service 82fcde
  */