Added a private tls.h file with definitions for the reserved TLS slots.
Renamed i386_set_kstack() to i386_set_tss_and_kstack(), because that's what it does. Added a new function arch_thread_init_tls() which must be called after having allocated the TLS area. Renamed arch_thread_initialize_kthread_stack() to arch_thread_init_kthread_stack() to be more consistent. Changed the parameters for arch_thread_enter_uspace() - it now gets a pointer to the thread structure and takes the user stack pointer from there (which might also be architectural different). git-svn-id: file:///srv/svn/repos/haiku/trunk/current@2379 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
** Copyright 2003, Axel Dörfler, [email protected]. All rights reserved.
|
||||
** Distributed under the terms of the OpenBeOS License.
|
||||
*/
|
||||
#ifndef _KERNEL_TLS_H
|
||||
#define _KERNEL_TLS_H
|
||||
|
||||
#include <support/TLS.h>
|
||||
|
||||
|
||||
#define TLS_SIZE (TLS_MAX_KEYS * sizeof(void *))
|
||||
|
||||
enum {
|
||||
TLS_BASE_ADDRESS_SLOT = 0,
|
||||
// contains the address of the local storage space
|
||||
|
||||
TLS_THREAD_ID_SLOT,
|
||||
TLS_ERRNO_SLOT,
|
||||
|
||||
// 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 */
|
||||
Reference in New Issue
Block a user