diff options
| author | Andrew Morton <akpm@osdl.org> | 2004-05-09 23:55:27 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2004-05-09 23:55:27 -0700 |
| commit | a7c8a1d320ff544a044f6fac5c7fda557f5ef60c (patch) | |
| tree | b1ab64fe86b137b1548c6e8d9cdb650d8c85c17c /arch/ppc64/kernel/process.c | |
| parent | e736428d8be55699f3d9626f5196402a3702575b (diff) | |
[PATCH] sched: in_sched_functions() cleanup
From: Rusty Russell <rusty@rustcorp.com.au>
1) Create an in_sched_functions() function in sched.c and make the
archs use it. (Two archs have wchan #if 0'd out: left them alone).
2) Move __sched from linux/init.h to linux/sched.h and add comment.
3) Rename __scheduling_functions_start_here/end_here to __sched_text_start/end.
Thanks to wli and Sam Ravnborg for clue donation.
Diffstat (limited to 'arch/ppc64/kernel/process.c')
| -rw-r--r-- | arch/ppc64/kernel/process.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/arch/ppc64/kernel/process.c b/arch/ppc64/kernel/process.c index a64973cf5862..c88ea00e88ea 100644 --- a/arch/ppc64/kernel/process.c +++ b/arch/ppc64/kernel/process.c @@ -469,12 +469,6 @@ static inline int validate_sp(unsigned long sp, struct task_struct *p) return 1; } -/* - * 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 ip, sp; @@ -493,7 +487,7 @@ unsigned long get_wchan(struct task_struct *p) return 0; if (count > 0) { ip = *(unsigned long *)(sp + 16); - if (ip < first_sched || ip >= last_sched) + if (!in_sched_functions(ip)) return ip; } } while (count++ < 16); |
