patch-2.2.4 linux/fs/proc/array.c
Next file: linux/fs/sysv/ialloc.c
Previous file: linux/fs/open.c
Back to the patch index
Back to the overall index
- Lines: 25
- Date:
Wed Mar 10 21:49:10 1999
- Orig file:
v2.2.3/linux/fs/proc/array.c
- Orig date:
Wed Mar 10 15:29:49 1999
diff -u --recursive --new-file v2.2.3/linux/fs/proc/array.c linux/fs/proc/array.c
@@ -550,7 +550,23 @@
} while (count++ < 16);
}
#elif defined(__powerpc__)
- return (p->tss.wchan);
+ {
+ unsigned long ip, sp;
+ unsigned long stack_page = (unsigned long) p;
+ int count = 0;
+
+ sp = p->tss.ksp;
+ do {
+ sp = *(unsigned long *)sp;
+ if (sp < stack_page || sp >= stack_page + 8188)
+ return 0;
+ if (count > 0) {
+ ip = *(unsigned long *)(sp + 4);
+ if (ip < first_sched || ip >= last_sched)
+ return ip;
+ }
+ } while (count++ < 16);
+ }
#elif defined (CONFIG_ARM)
{
unsigned long fp, lr;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)