tFix a bug in Linux? - plan9port - [fork] Plan 9 from user space
(HTM) git clone git://src.adamsgaard.dk/plan9port
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) commit 8110278003252f8579d61cd99392801a1857cdc2
(DIR) parent a0abdf6219da9ad91b18937890e77294647a04c4
(HTM) Author: rsc <devnull@localhost>
Date: Tue, 14 Oct 2003 01:46:24 +0000
Fix a bug in Linux?
Diffstat:
M src/libthread/proctab.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
---
(DIR) diff --git a/src/libthread/proctab.c b/src/libthread/proctab.c
t@@ -29,12 +29,14 @@ __threadgetproc(int rm)
Thread *t;
ulong *s;
+/* fails on linux, probably because the main stack
+ * has to be grown a page at a time instead of the big jump?
s = (ulong*)((ulong)&pid & ~(STKSIZE-1));
if(s[0] == STKMAGIC){
t = (Thread*)s[1];
return t->proc;
}
-
+*/
pid = _threadgetpid();
lock(&ptablock);