xref: /haiku/headers/private/system/tls.h (revision 2b76973fa2401f7a5edf68e6470f3d3210cbcff3)
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 
23 	// Note: these entries can safely be changed between
24 	// releases; 3rd party code always calls tls_allocate()
25 	// to get a free slot
26 
27 	TLS_FIRST_FREE_SLOT
28 		// the first free slot for user allocations
29 };
30 
31 #endif	/* _KERNEL_TLS_H */
32