(lwpCreate) [UCONTEXT]: ss_sp is the (base) address of the stack area,
not the initial stack pointer. Fix. ss_size was wrong as well. Amazing that this ever worked.
This commit is contained in:
parent
bc270377d5
commit
16fe285ec7
1 changed files with 2 additions and 2 deletions
|
@ -218,8 +218,8 @@ lwpCreate(int priority, void (*entry)(void *), int stacksz, int flags, char *nam
|
||||||
lwpReady(newp);
|
lwpReady(newp);
|
||||||
lwpReady(LwpCurrent);
|
lwpReady(LwpCurrent);
|
||||||
#ifdef UCONTEXT
|
#ifdef UCONTEXT
|
||||||
usp.ss_sp = sp;
|
usp.ss_sp = s + redsize;
|
||||||
usp.ss_size = size;
|
usp.ss_size = stacksz;
|
||||||
usp.ss_flags = 0;
|
usp.ss_flags = 0;
|
||||||
lwpInitContext(newp, &usp); /* architecture-dependent: from arch.c */
|
lwpInitContext(newp, &usp); /* architecture-dependent: from arch.c */
|
||||||
#else /* UCONTEXT */
|
#else /* UCONTEXT */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue