use the -newos toolchain even if -elf is present.
[newos.git] / include / kernel / arch / thread.h
blob552fe4051c163da78ae2ddf9b967818eade1086e
1 /*
2 ** Copyright 2001-2004, Travis Geiselbrecht. All rights reserved.
3 ** Distributed under the terms of the NewOS License.
4 */
5 #ifndef _NEWOS_KERNEL_ARCH_THREAD_H
6 #define _NEWOS_KERNEL_ARCH_THREAD_H
8 #include <signal.h>
10 // forward declarations to make the compiler happy and keep the header
11 // interdependencies down
12 struct thread;
13 struct vm_translation_map_struct;
15 int arch_thread_init(kernel_args *ka);
17 int arch_proc_init_proc_struct(struct proc *p, bool kernel);
18 int arch_thread_init_thread_struct(struct thread *t);
19 void arch_thread_context_switch(struct thread *t_from, struct thread *t_to, struct vm_translation_map_struct *new_tmap);
20 int arch_thread_initialize_kthread_stack(struct thread *t, int (*start_func)(void));
21 void arch_thread_dump_info(void *info);
22 void arch_thread_enter_uspace(struct thread *t, addr_t entry, void *args, addr_t ustack_top);
23 void arch_thread_switch_kstack_and_call(addr_t new_kstack, void (*func)(void *), void *arg);
25 struct thread *arch_thread_get_current_thread(void);
26 void arch_thread_set_current_thread(struct thread *t);
28 int arch_setup_signal_frame(struct thread *t, struct sigaction *sa, int sig, int sig_mask);
29 int64 arch_restore_signal_frame(void);
30 void arch_check_syscall_restart(struct thread *t);
32 // for any inline overrides
33 #include INC_ARCH(kernel/arch,thread.h)
35 #endif