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