2 * Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de.
3 * Distributed under the terms of the MIT License.
5 * Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
6 * Distributed under the terms of the NewOS License.
8 #ifndef KERNEL_ARCH_THREAD_H
9 #define KERNEL_ARCH_THREAD_H
12 #include <thread_types.h>
19 status_t
arch_thread_init(struct kernel_args
*args
);
20 status_t
arch_team_init_team_struct(Team
*t
, bool kernel
);
21 status_t
arch_thread_init_thread_struct(Thread
*t
);
22 status_t
arch_thread_init_tls(Thread
*thread
);
23 void arch_thread_context_switch(Thread
*t_from
, Thread
*t_to
);
24 void arch_thread_init_kthread_stack(Thread
*thread
, void *stack
,
25 void *stackTop
, void (*function
)(void*), const void *data
);
26 void arch_thread_dump_info(void *info
);
27 status_t
arch_thread_enter_userspace(Thread
*t
, addr_t entry
,
28 void *args1
, void *args2
);
30 bool arch_on_signal_stack(Thread
*thread
);
31 status_t
arch_setup_signal_frame(Thread
*thread
, struct sigaction
*action
,
32 struct signal_frame_data
*signalFrameData
);
33 int64
arch_restore_signal_frame(struct signal_frame_data
* signalFrameData
);
35 void arch_store_fork_frame(struct arch_fork_arg
*arg
);
36 void arch_restore_fork_frame(struct arch_fork_arg
*arg
);
38 #define arch_syscall_64_bit_return_value()
39 // overridden by architectures that need special handling
45 // for any inline overrides
46 #include <arch_thread.h>
48 #endif /* KERNEL_ARCH_THREAD_H */