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#define TLS_COMPAT_SIZE (TLS_MAX_KEYS * sizeof(uint32))
14
15enum {
16	TLS_BASE_ADDRESS_SLOT = 0,
17		// contains the address of the local storage space
18
19	TLS_THREAD_ID_SLOT,
20	TLS_ERRNO_SLOT,
21	TLS_ON_EXIT_THREAD_SLOT,
22	TLS_USER_THREAD_SLOT,
23	TLS_DYNAMIC_THREAD_VECTOR,
24	TLS_LOCALE_SLOT,
25
26	// Note: these entries can safely be changed between
27	// releases; 3rd party code always calls tls_allocate()
28	// to get a free slot
29
30	TLS_FIRST_FREE_SLOT
31		// the first free slot for user allocations
32};
33
34#endif	/* _KERNEL_TLS_H */
35