1 /* 2 ** Copyright 2001-2002, Travis Geiselbrecht. All rights reserved. 3 ** Distributed under the terms of the NewOS License. 4 */ 5 #ifndef _KERNEL_ARCH_THREAD_H 6 #define _KERNEL_ARCH_THREAD_H 7 8 #include <thread.h> 9 10 int arch_team_init_team_struct(struct team *t, bool kernel); 11 int arch_thread_init_thread_struct(struct thread *t); 12 void arch_thread_init_tls(struct thread *thread); 13 void arch_thread_context_switch(struct thread *t_from, struct thread *t_to); 14 int arch_thread_init_kthread_stack(struct thread *t, int (*start_func)(void), void (*entry_func)(void), void (*exit_func)(void)); 15 void arch_thread_dump_info(void *info); 16 void arch_thread_enter_uspace(struct thread *t, addr entry, void *args); 17 void arch_thread_switch_kstack_and_call(struct thread *t, addr new_kstack, void (*func)(void *), void *arg); 18 19 //struct thread *arch_thread_get_current_thread(void); 20 //void arch_thread_set_current_thread(struct thread *t); 21 22 void arch_setup_signal_frame(struct thread *t, struct sigaction *sa, int sig, int sig_mask); 23 int64 arch_restore_signal_frame(void); 24 void arch_check_syscall_restart(struct thread *t); 25 26 // for any inline overrides 27 #include <arch_thread.h> 28 29 #endif /* _KERNEL_ARCH_THREAD_H */ 30