summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_create.c
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-04-30 15:05:17 +0000
committerdeischen <deischen@FreeBSD.org>2003-04-30 15:05:17 +0000
commit63fd7f747915e38a5553bbcb55939d5e483445c7 (patch)
tree9350a8aef34768a87292c8deae80e7fc8f1af999 /lib/libpthread/thread/thr_create.c
parent7a4c9eae2ed9416c9c848f1f44a8aa02b7e6da7f (diff)
downloadFreeBSD-src-63fd7f747915e38a5553bbcb55939d5e483445c7.zip
FreeBSD-src-63fd7f747915e38a5553bbcb55939d5e483445c7.tar.gz
Move the mailbox to the beginning of the thread and align the
thread so that the context (SSE FPU state) is also aligned.
Diffstat (limited to 'lib/libpthread/thread/thr_create.c')
-rw-r--r--lib/libpthread/thread/thr_create.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_create.c b/lib/libpthread/thread/thr_create.c
index 4c65d3c..0c9edbd 100644
--- a/lib/libpthread/thread/thr_create.c
+++ b/lib/libpthread/thread/thr_create.c
@@ -97,6 +97,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
struct pthread *curthread, *new_thread;
struct kse *kse = NULL;
struct kse_group *kseg = NULL;
+ void *p;
kse_critical_t crit;
int i;
int ret = 0;
@@ -123,7 +124,9 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
ret = EAGAIN;
} else {
/* Initialize the thread structure: */
+ p = new_thread->alloc_addr;
memset(new_thread, 0, sizeof(struct pthread));
+ new_thread->alloc_addr = p;
/* Check if default thread attributes are required: */
if (attr == NULL || *attr == NULL)
OpenPOWER on IntegriCloud