From: Dave A. <ai...@us...> - 2001-05-20 17:49:44
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel In directory usw-pr-cvs1:/tmp/cvs-serv7649 Modified Files: process.c Log Message: switch to include linux/unistd rather than asm/unistd.. implement first attempt at start_thread Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/kernel/process.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- process.c 2001/03/07 02:03:25 1.7 +++ process.c 2001/05/20 17:49:42 1.8 @@ -7,6 +7,7 @@ */ #define __KERNEL_SYSCALLS__ +#include <stdarg.h> #include <linux/smp_lock.h> #include <linux/fs.h> @@ -19,7 +20,7 @@ #include <asm/mtpr.h> #include <asm/ptrace.h> -#include <asm/unistd.h> +#include <linux/unistd.h> #include <asm/elf.h> @@ -129,7 +130,8 @@ p->thread.pcb.usp = usp; p->thread.pcb.pc = (unsigned long)ret_from_syscall; p->thread.pcb.psl = __psl; - + + /* We could speed this up by loading the register values into the PCB and start the new thread just before the REI in entry.S, letting the regular context switching load the @@ -243,4 +245,16 @@ { /* no FPU support .. YET - D.A. 25 Feb 2001 */ return 0; +} + +void start_thread(struct pt_regs *regs, unsigned long new_pc, unsigned long new_sp) +{ + + printk("starting thread %8lX %8lX %8lX\n", new_pc, new_sp, regs->sp); + // set_fs(USER_DS); + regs->pc = new_pc; + regs->sp = new_sp; + regs->psl.prevmode = PSL_MODE_USER; + regs->psl.accmode = PSL_MODE_USER; + } |