From 13bfe4204bba5f542f868528020a12496d524a3f Mon Sep 17 00:00:00 2001 From: dt Date: Mon, 12 Jul 1999 16:09:30 +0000 Subject: Use USRSTACK (defined in ) to get top of the initial stack. PTHREAD_STACK_TOP was wrong for all supported architectures. --- lib/libpthread/thread/thr_init.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/libpthread/thread/thr_init.c') diff --git a/lib/libpthread/thread/thr_init.c b/lib/libpthread/thread/thr_init.c index f5e2c45..90a91cc 100644 --- a/lib/libpthread/thread/thr_init.c +++ b/lib/libpthread/thread/thr_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 #include #include -#include +#include +#include #include #ifdef _THREAD_SAFE #include @@ -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) { -- cgit v1.1