]> sourceware.org Git - glibc.git/blob - sysdeps/mach/hurd/tls.h
f550ed3a517a35a9a32e0490325f295f174de7c7
[glibc.git] / sysdeps / mach / hurd / tls.h
1 /* Definitions for thread-local data handling. Hurd version.
2 Copyright (C) 2003 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, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
19
20 #ifndef _TLS_H
21 #define _TLS_H
22
23 #ifdef HAVE_TLS_SUPPORT
24
25 /* Type for the dtv. */
26 typedef union dtv
27 {
28 size_t counter;
29 void *pointer;
30 } dtv_t;
31
32
33 /* Type of the TCB. */
34 typedef struct
35 {
36 void *tcb; /* Points to this structure. */
37 dtv_t *dtv; /* Vector of pointers to TLS data. */
38 thread_t self; /* This thread's control port. */
39 } tcbhead_t;
40
41 /* This is the size of the initial TCB. */
42 # define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
43
44 /* Alignment requirements for the initial TCB. */
45 # define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
46
47 /* This is the size of the TCB. */
48 # define TLS_TCB_SIZE TLS_INIT_TCB_SIZE /* XXX */
49
50 /* Alignment requirements for the TCB. */
51 # define TLS_TCB_ALIGN TLS_INIT_TCB_ALIGN /* XXX */
52
53 #endif /* HAVE_TLS_SUPPORT */
54
55 #endif /* tls.h */
This page took 0.03824 seconds and 4 git commands to generate.