(lwpNewContext): Fix the previous revision.
This commit is contained in:
parent
d343fee727
commit
fdea1beb34
1 changed files with 4 additions and 3 deletions
|
@ -77,15 +77,16 @@ lwpNewContext(struct lwpProc *newp, int stacksz)
|
||||||
free(s);
|
free(s);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
newp->context.uc_stack.ss_sp = newp->ustack;
|
|
||||||
newp->context.uc_stack.ss_size = newp->usize;
|
|
||||||
#ifdef MAKECONTEXT_SP_HIGH
|
#ifdef MAKECONTEXT_SP_HIGH
|
||||||
/*
|
/*
|
||||||
* Known systems that are broken that way: Solaris prior to 10,
|
* Known systems that are broken that way: Solaris prior to 10,
|
||||||
* IRIX.
|
* IRIX.
|
||||||
*/
|
*/
|
||||||
newp->context.uc_stack.ss_sp += stacksz - 8;
|
newp->context.uc_stack.ss_sp = newp->ustack + stacksz - 8;
|
||||||
|
#else
|
||||||
|
newp->context.uc_stack.ss_sp = newp->ustack;
|
||||||
#endif
|
#endif
|
||||||
|
newp->context.uc_stack.ss_size = newp->usize;
|
||||||
newp->context.uc_stack.ss_flags = 0;
|
newp->context.uc_stack.ss_flags = 0;
|
||||||
newp->context.uc_link = NULL;
|
newp->context.uc_link = NULL;
|
||||||
makecontext(&newp->context, lwpEntryPoint, 0);
|
makecontext(&newp->context, lwpEntryPoint, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue