diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1999-12-04 03:58:56 +0000 |
commit | 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d (patch) | |
tree | 357efc7b93f8f5102110d20d293f41360ec212fc /fs/proc | |
parent | aea27b2e18d69af87e673972246e66657b4fa274 (diff) |
Merge with Linux 2.3.21.
Diffstat (limited to 'fs/proc')
-rw-r--r-- | fs/proc/array.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/proc/array.c b/fs/proc/array.c index e2775ae0d..801ecee88 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -575,10 +575,20 @@ static unsigned long get_wchan(struct task_struct *p) unsigned long pc; pc = thread_saved_pc(&p->thread); - if (pc >= (unsigned long) interruptible_sleep_on && pc < (unsigned long) add_timer) { - schedule_frame = ((unsigned long *)(long)p->thread.reg30)[16]; - return (unsigned long)((unsigned long *)schedule_frame)[11]; + if (pc == (unsigned long) interruptible_sleep_on + || pc == (unsigned long) sleep_on) { + schedule_frame = ((unsigned long *)p->thread.reg30)[9]; + return ((unsigned long *)schedule_frame)[15]; } + if (pc == (unsigned long) interruptible_sleep_on_timeout + || pc == (unsigned long) sleep_on_timeout) { + schedule_frame = ((unsigned long *)p->thread.reg30)[9]; + return ((unsigned long *)schedule_frame)[16]; + } + if (pc >= first_sched && pc < last_sched) { + printk(KERN_DEBUG "Bug in %s\n", __FUNCTION__); + } + return pc; } #elif defined(__mc68000__) |