2002-07-09 16:24:59 +04:00
|
|
|
/*
|
2007-01-11 21:21:35 +03:00
|
|
|
* Copyright 2002-2007, Axel Dörfler, axeld@pinc-software.de.
|
2004-12-14 01:22:45 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*
|
|
|
|
* Copyright 2001-2002, Travis Geiselbrecht. All rights reserved.
|
|
|
|
* Distributed under the terms of the NewOS License.
|
|
|
|
*/
|
2003-05-03 18:12:16 +04:00
|
|
|
#ifndef KERNEL_ARCH_THREAD_H
|
|
|
|
#define KERNEL_ARCH_THREAD_H
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2004-12-14 01:22:45 +03:00
|
|
|
|
|
|
|
#include <thread_types.h>
|
|
|
|
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2004-03-16 05:24:42 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-10-26 02:08:48 +04:00
|
|
|
status_t arch_thread_init(struct kernel_args *args);
|
2011-01-11 00:54:38 +03:00
|
|
|
status_t arch_team_init_team_struct(Team *t, bool kernel);
|
|
|
|
status_t arch_thread_init_thread_struct(Thread *t);
|
|
|
|
status_t arch_thread_init_tls(Thread *thread);
|
|
|
|
void arch_thread_context_switch(Thread *t_from, Thread *t_to);
|
2011-06-12 04:00:23 +04:00
|
|
|
void arch_thread_init_kthread_stack(Thread *thread, void *stack,
|
|
|
|
void *stackTop, void (*function)(void*), const void *data);
|
2002-07-09 16:24:59 +04:00
|
|
|
void arch_thread_dump_info(void *info);
|
2011-01-11 00:54:38 +03:00
|
|
|
status_t arch_thread_enter_userspace(Thread *t, addr_t entry,
|
2007-08-16 22:01:47 +04:00
|
|
|
void *args1, void *args2);
|
2002-07-09 16:24:59 +04:00
|
|
|
|
2011-01-11 00:54:38 +03:00
|
|
|
bool arch_on_signal_stack(Thread *thread);
|
2011-06-12 04:00:23 +04:00
|
|
|
status_t arch_setup_signal_frame(Thread *thread, struct sigaction *action,
|
|
|
|
struct signal_frame_data *signalFrameData);
|
|
|
|
int64 arch_restore_signal_frame(struct signal_frame_data* signalFrameData);
|
2002-10-23 21:31:10 +04:00
|
|
|
|
2004-10-12 07:57:31 +04:00
|
|
|
void arch_store_fork_frame(struct arch_fork_arg *arg);
|
|
|
|
void arch_restore_fork_frame(struct arch_fork_arg *arg);
|
|
|
|
|
2008-01-11 03:36:44 +03:00
|
|
|
#define arch_syscall_64_bit_return_value()
|
|
|
|
// overridden by architectures that need special handling
|
|
|
|
|
2004-03-16 05:24:42 +03:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2007-07-15 04:35:10 +04:00
|
|
|
// for any inline overrides
|
|
|
|
#include <arch_thread.h>
|
|
|
|
|
2003-05-03 18:12:16 +04:00
|
|
|
#endif /* KERNEL_ARCH_THREAD_H */
|