summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_private.h
diff options
context:
space:
mode:
authoralfred <alfred@FreeBSD.org>2002-05-13 07:58:15 +0000
committeralfred <alfred@FreeBSD.org>2002-05-13 07:58:15 +0000
commit135bb8bda20243a1d25ec3f1957340e0ad3adb78 (patch)
tree560dda98ad29714a8b86e7627eb2c047ba236df3 /lib/libpthread/thread/thr_private.h
parent796d01e2a84d0cd774be8511d13ebf2076c43f66 (diff)
downloadFreeBSD-src-135bb8bda20243a1d25ec3f1957340e0ad3adb78.zip
FreeBSD-src-135bb8bda20243a1d25ec3f1957340e0ad3adb78.tar.gz
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
Diffstat (limited to 'lib/libpthread/thread/thr_private.h')
-rw-r--r--lib/libpthread/thread/thr_private.h10
1 files changed, 5 insertions, 5 deletions
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
OpenPOWER on IntegriCloud