diff options
author | marcel <marcel@FreeBSD.org> | 2003-08-06 00:23:40 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-08-06 00:23:40 +0000 |
commit | 5dfa7ee632d0c80c07c607c80c1c64c54e21d713 (patch) | |
tree | e5facacee24f0e641fdf47521aa7252fc32cb6db /lib | |
parent | e45924adacc537bd33ecd167bd88c4ab9ace9097 (diff) | |
download | FreeBSD-src-5dfa7ee632d0c80c07c607c80c1c64c54e21d713.zip FreeBSD-src-5dfa7ee632d0c80c07c607c80c1c64c54e21d713.tar.gz |
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.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libkse/thread/thr_create.c | 2 | ||||
-rw-r--r-- | lib/libpthread/thread/thr_create.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_create.c b/lib/libkse/thread/thr_create.c index fcc4ac5..c73a3da 100644 --- a/lib/libkse/thread/thr_create.c +++ b/lib/libkse/thread/thr_create.c @@ -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 diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c index fcc4ac5..c73a3da 100644 --- a/lib/libpthread/thread/thr_create.c +++ b/lib/libpthread/thread/thr_create.c @@ -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 |