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:
Axel Dörfler
2003-01-07 09:17:31 +00:00
parent 1f6480576d
commit 074a16b53e
4 changed files with 36 additions and 8 deletions
+6 -6
View File
@@ -2,17 +2,18 @@
** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
** Distributed under the terms of the NewOS License.
*/
#ifndef _NEWOS_KERNEL_ARCH_THREAD_H
#define _NEWOS_KERNEL_ARCH_THREAD_H
#ifndef _KERNEL_ARCH_THREAD_H
#define _KERNEL_ARCH_THREAD_H
#include <thread.h>
int arch_team_init_team_struct(struct team *t, bool kernel);
int arch_thread_init_thread_struct(struct thread *t);
void arch_thread_init_tls(struct thread *thread);
void arch_thread_context_switch(struct thread *t_from, struct thread *t_to);
int arch_thread_initialize_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void));
int arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void));
void arch_thread_dump_info(void *info);
void arch_thread_enter_uspace(addr entry, void *args, addr ustack_top);
void arch_thread_enter_uspace(struct thread *t, addr entry, void *args);
void arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg);
//struct thread *arch_thread_get_current_thread(void);
@@ -25,5 +26,4 @@ void arch_check_syscall_restart(struct thread *t);
// for any inline overrides
#include <arch_thread.h>
#endif
#endif /* _KERNEL_ARCH_THREAD_H */