summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_init.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_init.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_init.c')
-rw-r--r--lib/libpthread/thread/thr_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c
index d43adf5..f06df6c 100644
--- a/lib/libpthread/thread/thr_init.c
+++ b/lib/libpthread/thread/thr_init.c
@@ -311,10 +311,13 @@ _libpthread_init(struct pthread *curthread)
static void
init_main_thread(struct pthread *thread)
{
+ void *p;
int i;
/* Zero the initial thread structure. */
+ p = thread->alloc_addr;
memset(thread, 0, sizeof(struct pthread));
+ thread->alloc_addr = p;
/* Setup the thread attributes. */
thread->attr = _pthread_attr_default;
OpenPOWER on IntegriCloud