haiku/headers/private/system/tls.h
Jérôme Duval 27b32ee02c kernel/x86_64: adjust descriptors tables for compatibility mode.
* also adjust BOOT_GDT_SEGMENT_COUNT for x86, the definition is used by the
boot loader.
* add some 32-bit definitions.
* add a UserTLSDescriptor class, this will be used by 32-bit threads.

Change-Id: I5b1d978969a1ce97091a16c9ec2ad7c0ca831656
2018-05-15 10:27:02 +00:00

34 lines
738 B
C

/*
* Copyright 2003-2009, Axel Dörfler, axeld@pinc-software.de.
* Distributed under the terms of the MIT License.
*/
#ifndef _KERNEL_TLS_H
#define _KERNEL_TLS_H
#include <support/TLS.h>
#define TLS_SIZE (TLS_MAX_KEYS * sizeof(void *))
#define TLS_COMPAT_SIZE (TLS_MAX_KEYS * sizeof(uint32))
enum {
TLS_BASE_ADDRESS_SLOT = 0,
// contains the address of the local storage space
TLS_THREAD_ID_SLOT,
TLS_ERRNO_SLOT,
TLS_ON_EXIT_THREAD_SLOT,
TLS_USER_THREAD_SLOT,
TLS_DYNAMIC_THREAD_VECTOR,
// Note: these entries can safely be changed between
// releases; 3rd party code always calls tls_allocate()
// to get a free slot
TLS_FIRST_FREE_SLOT
// the first free slot for user allocations
};
#endif /* _KERNEL_TLS_H */