Fix LWP's stack initialization for -s
With -s, LWP initializes thread stacks to track stack use. It did that after makecontext(), with disastrous results on systems where makecontext() writes something to the stack that swapcontext() expects to find there. Makes FreeBSD 6.2 crash in swapcontext(). Factor stack allocation out of lwpNewContext() into lwpNewStack(). Move call of lwpStackCheckInit() into lwpNewStack().
This commit is contained in:
parent
40eb78eb74
commit
5c2f7646e1
3 changed files with 33 additions and 27 deletions
|
@ -73,7 +73,7 @@ struct lwpQueue {
|
|||
|
||||
extern int LwpStackGrowsDown;
|
||||
|
||||
int lwpNewContext(struct lwpProc *, int);
|
||||
int lwpNewContext(struct lwpProc *);
|
||||
void lwpSwitchContext(struct lwpProc *, struct lwpProc *);
|
||||
void lwpAddTail(struct lwpQueue *, struct lwpProc *);
|
||||
struct lwpProc *lwpGetFirst(struct lwpQueue *);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue