1 /* 2 * Copyright 2019 Haiku, Inc. All Rights Reserved. 3 * Distributed under the terms of the MIT License. 4 */ 5 #include <thread.h> 6 #include <arch_thread.h> 7 8 #include <arch_cpu.h> 9 #include <arch/thread.h> 10 #include <boot/stage2.h> 11 #include <kernel.h> 12 #include <thread.h> 13 #include <tls.h> 14 #include <vm/vm_types.h> 15 #include <vm/VMAddressSpace.h> 16 #include <arch_vm.h> 17 #include <arch/vm_translation_map.h> 18 19 #include <string.h> 20 21 //#define TRACE_ARCH_THREAD 22 #ifdef TRACE_ARCH_THREAD 23 # define TRACE(x) dprintf x 24 #else 25 # define TRACE(x) ; 26 #endif 27 28 29 status_t 30 arch_thread_init(struct kernel_args *args) 31 { 32 return B_OK; 33 } 34 35 36 status_t 37 arch_team_init_team_struct(Team *team, bool kernel) 38 { 39 return B_OK; 40 } 41 42 43 status_t 44 arch_thread_init_thread_struct(Thread *thread) 45 { 46 return B_OK; 47 } 48 49 50 void 51 arch_thread_init_kthread_stack(Thread* thread, void* _stack, void* _stackTop, 52 void (*function)(void*), const void* data) 53 { 54 } 55 56 57 status_t 58 arch_thread_init_tls(Thread *thread) 59 { 60 return 0; 61 } 62 63 64 void 65 arch_thread_context_switch(Thread *from, Thread *to) 66 { 67 } 68 69 void 70 arch_thread_dump_info(void *info) 71 { 72 } 73 74 75 status_t 76 arch_thread_enter_userspace(Thread *thread, addr_t entry, 77 void *arg1, void *arg2) 78 { 79 return B_ERROR; 80 } 81 82 83 bool 84 arch_on_signal_stack(Thread *thread) 85 { 86 return false; 87 } 88 89 90 status_t 91 arch_setup_signal_frame(Thread *thread, struct sigaction *sa, 92 struct signal_frame_data *signalFrameData) 93 { 94 return B_ERROR; 95 } 96 97 98 int64 99 arch_restore_signal_frame(struct signal_frame_data* signalFrameData) 100 { 101 return 0; 102 } 103 104 105 void 106 arch_check_syscall_restart(Thread *thread) 107 { 108 } 109 110 111 void 112 arch_store_fork_frame(struct arch_fork_arg *arg) 113 { 114 } 115 116 117 void 118 arch_restore_fork_frame(struct arch_fork_arg *arg) 119 { 120 } 121