* There was no reason to copy the "userland calls exit_thread()" stub with interrupts
turned off - accessing userland memory. Now, arch_thread_enter_userspace() does that job, and as a result, may also fail. * dump_thread() now directly prints the info of the current thread when used without argument (rather than iterating the thread list to look for the current thread). * If arch_thread_init_tls() fails upon thread creation, the function will now return an error. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@19775 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -23,7 +23,7 @@ status_t arch_thread_init_tls(struct thread *thread);
|
||||
void arch_thread_context_switch(struct thread *t_from, struct thread *t_to);
|
||||
status_t 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(struct thread *t, addr_t entry, void *args1, void *args2);
|
||||
status_t arch_thread_enter_userspace(struct thread *t, addr_t entry, void *args1, void *args2);
|
||||
void arch_thread_switch_kstack_and_call(struct thread *t, addr_t new_kstack, void (*func)(void *), void *arg);
|
||||
|
||||
// ToDo: doing this this way is an ugly hack - please fix me!
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2006, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Copyright 2002-2007, Axel Dörfler, [email protected]. All rights reserved.
|
||||
* Distributed under the terms of the MIT License.
|
||||
*
|
||||
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
||||
@@ -100,7 +100,9 @@ struct arch_thread;
|
||||
|
||||
void __x86_setup_system_time(uint32 cv_factor);
|
||||
void i386_context_switch(struct arch_thread *old_state, struct arch_thread *new_state, addr_t new_pgdir);
|
||||
void i386_enter_uspace(addr_t entry, void *args1, void *args2, addr_t ustack_top);
|
||||
void x86_userspace_thread_exit(void);
|
||||
void x86_end_userspace_thread_exit(void);
|
||||
void x86_enter_userspace(addr_t entry, void *args1, void *args2, addr_t ustack_top);
|
||||
void i386_set_tss_and_kstack(addr_t kstack);
|
||||
void i386_switch_stack_and_call(addr_t stack, void (*func)(void *), void *arg);
|
||||
void i386_swap_pgdir(addr_t new_pgdir);
|
||||
|
||||
Reference in New Issue
Block a user