X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fcris%2Farch-v10%2Fkernel%2Fprocess.c;h=87ff377908273cce6778870b335dc8d5c225f507;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=d0993bf720183e8530afe4faaee046b9d7aa012a;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/cris/arch-v10/kernel/process.c b/arch/cris/arch-v10/kernel/process.c index d0993bf72..87ff37790 100644 --- a/arch/cris/arch-v10/kernel/process.c +++ b/arch/cris/arch-v10/kernel/process.c @@ -1,4 +1,4 @@ -/* $Id: process.c,v 1.6 2004/05/11 12:28:25 starvik Exp $ +/* $Id: process.c,v 1.9 2004/10/19 13:07:37 starvik Exp $ * * linux/arch/cris/kernel/process.c * @@ -34,6 +34,15 @@ void default_idle(void) #endif } +/* + * Free current thread data structures etc.. + */ + +void exit_thread(void) +{ + /* Nothing needs to be done. */ +} + /* if the watchdog is enabled, we can simply disable interrupts and go * into an eternal loop, and the watchdog will reset the CPU after 0.1s * if on the other hand the watchdog wasn't enabled, we just enable it and wait @@ -123,7 +132,7 @@ int copy_thread(int nr, unsigned long clone_flags, unsigned long usp, *childregs = *regs; /* struct copy of pt_regs */ p->set_child_tid = p->clear_child_tid = NULL; - + childregs->r10 = 0; /* child returns 0 after a fork/clone */ /* put the switch stack right below the pt_regs */ @@ -214,13 +223,6 @@ asmlinkage int sys_execve(const char *fname, char **argv, char **envp, return error; } -/* - * These bracket the sleeping functions.. - */ - -#define first_sched ((unsigned long)__sched_text_start) -#define last_sched ((unsigned long)__sched_text_end) - unsigned long get_wchan(struct task_struct *p) { #if 0 @@ -241,8 +243,8 @@ unsigned long get_wchan(struct task_struct *p) if (ebp < stack_page || ebp > 8184+stack_page) return 0; eip = *(unsigned long *) (ebp+4); - if (eip < first_sched || eip >= last_sched) - return eip; + if (!in_sched_functions(eip)) + return eip; ebp = *(unsigned long *) ebp; } while (count++ < 16); #endif