summaryrefslogtreecommitdiff
path: root/libpthread
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2004-08-13 23:39:45 +0000
committerEric Andersen <andersen@codepoet.org>2004-08-13 23:39:45 +0000
commit64c5a652fb76e999eea27aed777d710d747ed949 (patch)
tree99f55f2b3ed8fd1b6d0fda2523d5a6ee7063b05a /libpthread
parent9f47eaf3223c17a99cc88aea3287697e2635681f (diff)
Fixup PAGE_SIZE problems
-Erik
Diffstat (limited to 'libpthread')
-rw-r--r--libpthread/linuxthreads/internals.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpthread/linuxthreads/internals.h b/libpthread/linuxthreads/internals.h
index d4a9b85ba..b82a0365a 100644
--- a/libpthread/linuxthreads/internals.h
+++ b/libpthread/linuxthreads/internals.h
@@ -316,6 +316,8 @@ static inline int invalid_handle(pthread_handle h, pthread_t id)
/* The page size we can get from the system. This should likely not be
changed by the machine file but, you never know. */
+extern size_t _dl_pagesize;
+#include <bits/uClibc_page.h>
#ifndef PAGE_SIZE
#define PAGE_SIZE (sysconf (_SC_PAGESIZE))
#endif
@@ -327,19 +329,19 @@ static inline int invalid_handle(pthread_handle h, pthread_t id)
#ifdef __ARCH_HAS_MMU__
#define STACK_SIZE (2 * 1024 * 1024)
#else
-#define STACK_SIZE (4 * PAGE_SIZE)
+#define STACK_SIZE (4 * _dl_pagesize)
#endif
#endif
/* The initial size of the thread stack. Must be a multiple of PAGE_SIZE. */
#ifndef INITIAL_STACK_SIZE
-#define INITIAL_STACK_SIZE (4 * PAGE_SIZE)
+#define INITIAL_STACK_SIZE (4 * _dl_pagesize)
#endif
/* Size of the thread manager stack. The "- 32" avoids wasting space
with some malloc() implementations. */
#ifndef THREAD_MANAGER_STACK_SIZE
-#define THREAD_MANAGER_STACK_SIZE (2 * PAGE_SIZE - 32)
+#define THREAD_MANAGER_STACK_SIZE (2 * _dl_pagesize - 32)
#endif
/* The base of the "array" of thread stacks. The array will grow down from