Fix an off by one error in the number of arguments passed to

makecontext(). We only supply 3, not 4. This is mostly harmless,
except that on ia64 the garbage can include NaT bits, resulting
in NaT consumption faults.
This commit is contained in:
Marcel Moolenaar 2003-08-06 00:23:40 +00:00
parent 119fb38770
commit 4a997ca96e
2 changed files with 2 additions and 2 deletions

View File

@ -193,7 +193,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->tcb->tcb_tmbx.tm_context.uc_stack.ss_sp =
new_thread->attr.stackaddr_attr;
makecontext(&new_thread->tcb->tcb_tmbx.tm_context,
(void (*)(void))thread_start, 4, new_thread,
(void (*)(void))thread_start, 3, new_thread,
start_routine, arg);
/*
* Check if this thread is to inherit the scheduling

View File

@ -193,7 +193,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
new_thread->tcb->tcb_tmbx.tm_context.uc_stack.ss_sp =
new_thread->attr.stackaddr_attr;
makecontext(&new_thread->tcb->tcb_tmbx.tm_context,
(void (*)(void))thread_start, 4, new_thread,
(void (*)(void))thread_start, 3, new_thread,
start_routine, arg);
/*
* Check if this thread is to inherit the scheduling