1/* 2** Copyright 2001, Travis Geiselbrecht. All rights reserved. 3** Distributed under the terms of the NewOS License. 4*/ 5#include <kernel/kernel.h> 6#include <kernel/thread.h> 7 8int arch_proc_init_proc_struct(struct proc *p, bool kernel) 9{ 10 return 0; 11} 12 13int arch_thread_init_thread_struct(Thread *t) 14{ 15 return 0; 16} 17 18int arch_thread_initialize_kthread_stack(Thread *t, int (*start_func)(void), void (*entry_func)(void)) 19{ 20 return 0; 21} 22 23void arch_thread_context_switch(Thread *t_from, Thread *t_to) 24{ 25#if 0 26 int i; 27 dprintf("arch_thread_context_switch: 0x%x->0x%x to sp 0x%x\n", 28 t_from->id, t_to->id, t_to->arch_info.sp); 29#endif 30#if 0 31 for(i=0; i<8; i++) { 32 dprintf("sp[%d] = 0x%x\n", i, t_to->arch_info.sp[i]); 33 } 34#endif 35#if 0 36 sh4_set_kstack(t_to->kernel_stack_area->base + KSTACK_SIZE); 37 38 if(t_from->proc->arch_info.pgdir != t_to->proc->arch_info.pgdir) 39 sh4_set_user_pgdir((addr)t_to->proc->arch_info.pgdir); 40 sh4_context_switch(&t_from->arch_info.sp, t_to->arch_info.sp); 41#endif 42} 43 44void arch_thread_dump_info(void *info) 45{ 46} 47 48void arch_thread_enter_uspace(addr entry, addr ustack_top) 49{ 50} 51 52