(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:
Markus Armbruster 2005-12-07 20:39:55 +00:00
parent bc270377d5
commit 16fe285ec7

View file

@ -218,8 +218,8 @@ lwpCreate(int priority, void (*entry)(void *), int stacksz, int flags, char *nam
lwpReady(newp);
lwpReady(LwpCurrent);
#ifdef UCONTEXT
usp.ss_sp = sp;
usp.ss_size = size;
usp.ss_sp = s + redsize;
usp.ss_size = stacksz;
usp.ss_flags = 0;
lwpInitContext(newp, &usp); /* architecture-dependent: from arch.c */
#else /* UCONTEXT */