From 135bb8bda20243a1d25ec3f1957340e0ad3adb78 Mon Sep 17 00:00:00 2001 From: alfred Date: Mon, 13 May 2002 07:58:15 +0000 Subject: Don't use PAGE_SIZE in userland, instead use getpagesize(), this is to allow running on other arches when the instructions are supported but the page size granularity is not. Glanced at by: peter --- lib/libpthread/thread/thr_private.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/libpthread/thread/thr_private.h') diff --git a/lib/libpthread/thread/thr_private.h b/lib/libpthread/thread/thr_private.h index ec15c3a..333c02e 100644 --- a/lib/libpthread/thread/thr_private.h +++ b/lib/libpthread/thread/thr_private.h @@ -421,8 +421,11 @@ enum pthread_susp { * Since mmap() makes it possible to specify the maximum growth of a MAP_STACK * region, an unmapped gap between thread stacks achieves the same effect as * explicitly mapped red zones. + * This is declared and initialized in uthread_init.c. */ -#define PTHREAD_GUARD_DEFAULT PAGE_SIZE +extern int pthread_guard_default; + +extern int pthread_page_size; /* * Maximum size of initial thread's stack. This perhaps deserves to be larger @@ -431,9 +434,6 @@ enum pthread_susp { */ #define PTHREAD_STACK_INITIAL 0x100000 -/* Size of the scheduler stack: */ -#define SCHED_STACK_SIZE PAGE_SIZE - /* * Define the different priority ranges. All applications have thread * priorities constrained within 0-31. The threads library raises the @@ -971,7 +971,7 @@ SCLASS struct pthread_attr pthread_attr_default #ifdef GLOBAL_PTHREAD_PRIVATE = { SCHED_RR, 0, TIMESLICE_USEC, PTHREAD_DEFAULT_PRIORITY, PTHREAD_CREATE_RUNNING, PTHREAD_CREATE_JOINABLE, NULL, NULL, NULL, - PTHREAD_STACK_DEFAULT, PTHREAD_GUARD_DEFAULT }; + PTHREAD_STACK_DEFAULT, -1 }; #else ; #endif -- cgit v1.1