summaryrefslogtreecommitdiffstats
path: root/lib/libc_r/uthread/uthread_init.c
diff options
context:
space:
mode:
authordt <dt@FreeBSD.org>1999-07-12 16:09:30 +0000
committerdt <dt@FreeBSD.org>1999-07-12 16:09:30 +0000
commit13bfe4204bba5f542f868528020a12496d524a3f (patch)
treed93eeac3e23275567707177f5b5188c36d7dcf50 /lib/libc_r/uthread/uthread_init.c
parentcd75312f86da483a17d454b8ff3d2f46ee41f057 (diff)
downloadFreeBSD-src-13bfe4204bba5f542f868528020a12496d524a3f.zip
FreeBSD-src-13bfe4204bba5f542f868528020a12496d524a3f.tar.gz
Use USRSTACK (defined in <machine/vmparam.h>) to get top of the initial stack.
PTHREAD_STACK_TOP was wrong for all supported architectures.
Diffstat (limited to 'lib/libc_r/uthread/uthread_init.c')
-rw-r--r--lib/libc_r/uthread/uthread_init.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc_r/uthread/uthread_init.c b/lib/libc_r/uthread/uthread_init.c
index f5e2c45..90a91cc 100644
--- a/lib/libc_r/uthread/uthread_init.c
+++ b/lib/libc_r/uthread/uthread_init.c
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: uthread_init.c,v 1.14 1999/07/06 00:25:38 jasone Exp $
+ * $Id: uthread_init.c,v 1.15 1999/07/11 05:56:37 jasone Exp $
*/
/* Allocate space for global thread variables here: */
@@ -45,7 +45,8 @@
#include <sys/sysctl.h>
#include <sys/time.h>
#include <sys/ttycom.h>
-#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/user.h>
#include <sys/mman.h>
#ifdef _THREAD_SAFE
#include <machine/reg.h>
@@ -184,7 +185,7 @@ _thread_init(void)
SLIST_INIT(&_stackq);
/* Create the red zone for the main stack. */
- if (mmap((void *) PTHREAD_STACK_TOP
+ if (mmap((void *) USRSTACK
- PTHREAD_STACK_INITIAL,
PTHREAD_STACK_GUARD, 0, MAP_ANON,
-1, 0) == MAP_FAILED) {
OpenPOWER on IntegriCloud