summaryrefslogtreecommitdiff
path: root/lib/librthread
diff options
context:
space:
mode:
authorMarco Peereboom <marco@cvs.openbsd.org>2005-12-21 23:44:57 +0000
committerMarco Peereboom <marco@cvs.openbsd.org>2005-12-21 23:44:57 +0000
commit83e733a3a0eb4a6d5fc3f5bc99ecd4519f1dd6db (patch)
tree53e764ad0c6b6df4ab6cf3815768a07e128fe05f /lib/librthread
parentfb0910afa0d65c887ce59ee38c3a7f57236bfe28 (diff)
Align hppa stack to 64 bytes.
ok tedu
Diffstat (limited to 'lib/librthread')
-rw-r--r--lib/librthread/rthread.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/librthread/rthread.c b/lib/librthread/rthread.c
index 98988c63ab4..ad51a7db1ea 100644
--- a/lib/librthread/rthread.c
+++ b/lib/librthread/rthread.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rthread.c,v 1.13 2005/12/21 00:53:28 tedu Exp $ */
+/* $OpenBSD: rthread.c,v 1.14 2005/12/21 23:44:56 marco Exp $ */
/*
* Copyright (c) 2004,2005 Ted Unangst <tedu@openbsd.org>
* All Rights Reserved.
@@ -133,7 +133,8 @@ alloc_stack(size_t len, void *base)
}
}
#ifdef MACHINE_STACK_GROWS_UP
- stack->sp = (void *)(((size_t)stack->base + 16) & ~15);
+ stack->sp = (void *)(((size_t)stack->base + MACHINE_STACK_ALIGN) &
+ ~(MACHINE_STACK_ALIGN - 1));
#else
stack->sp = (void *)(((size_t)stack->base + len - 16) & ~15);
#endif