X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fm68knommu%2Fkernel%2Fprocess.c;h=581eef2b796b243a0b8c290480cac19783648cbb;hb=746550cff061581f89c687ada8523670768364f2;hp=6d9f428ef7a4efbca206ff8e08dde996aaa23e93;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/arch/m68knommu/kernel/process.c b/arch/m68knommu/kernel/process.c index 6d9f428ef..581eef2b7 100644 --- a/arch/m68knommu/kernel/process.c +++ b/arch/m68knommu/kernel/process.c @@ -404,12 +404,6 @@ out: return error; } -/* - * These bracket the sleeping functions.. - */ -#define first_sched ((unsigned long) scheduling_functions_start_here) -#define last_sched ((unsigned long) scheduling_functions_end_here) - unsigned long get_wchan(struct task_struct *p) { unsigned long fp, pc; @@ -425,7 +419,7 @@ unsigned long get_wchan(struct task_struct *p) fp >= 8184+stack_page) return 0; pc = ((unsigned long *)fp)[1]; - if (pc < first_sched || pc >= last_sched) + if (!in_sched_functions(pc)) return pc; fp = *(unsigned long *) fp; } while (count++ < 16); @@ -440,8 +434,7 @@ unsigned long thread_saved_pc(struct task_struct *tsk) struct switch_stack *sw = (struct switch_stack *)tsk->thread.ksp; /* Check whether the thread is blocked in resume() */ - if (sw->retpc > (unsigned long)scheduling_functions_start_here && - sw->retpc < (unsigned long)scheduling_functions_end_here) + if (in_sched_functions(sw->retpc)) return ((unsigned long *)sw->a6)[1]; else return sw->retpc;