xref: /haiku/headers/private/system/tls.h (revision a30a4a41f948ebb03b95dab065a27a584ac0c97a)
1 /*
2  * Copyright 2003-2009, Axel Dörfler, axeld@pinc-software.de.
3  * Distributed under the terms of the MIT License.
4  */
5 #ifndef _KERNEL_TLS_H
6 #define _KERNEL_TLS_H
7 
8 
9 #include <support/TLS.h>
10 
11 
12 #define TLS_SIZE (TLS_MAX_KEYS * sizeof(void *))
13 
14 enum {
15 	TLS_BASE_ADDRESS_SLOT = 0,
16 		// contains the address of the local storage space
17 
18 	TLS_THREAD_ID_SLOT,
19 	TLS_ERRNO_SLOT,
20 	TLS_ON_EXIT_THREAD_SLOT,
21 	TLS_USER_THREAD_SLOT,
22 	TLS_DYNAMIC_THREAD_VECTOR,
23 
24 	// Note: these entries can safely be changed between
25 	// releases; 3rd party code always calls tls_allocate()
26 	// to get a free slot
27 
28 	TLS_FIRST_FREE_SLOT
29 		// the first free slot for user allocations
30 };
31 
32 #endif	/* _KERNEL_TLS_H */
33