Fix a bug in Linux?
This commit is contained in:
parent
a0abdf6219
commit
8110278003
1 changed files with 3 additions and 1 deletions
|
|
@ -29,12 +29,14 @@ __threadgetproc(int rm)
|
||||||
Thread *t;
|
Thread *t;
|
||||||
ulong *s;
|
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));
|
s = (ulong*)((ulong)&pid & ~(STKSIZE-1));
|
||||||
if(s[0] == STKMAGIC){
|
if(s[0] == STKMAGIC){
|
||||||
t = (Thread*)s[1];
|
t = (Thread*)s[1];
|
||||||
return t->proc;
|
return t->proc;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
pid = _threadgetpid();
|
pid = _threadgetpid();
|
||||||
|
|
||||||
lock(&ptablock);
|
lock(&ptablock);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue