diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2012-02-13 17:12:37 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2012-02-13 17:12:37 +0400 |
commit | d7bcd2a16f4dfad45357c57bc6334db51652215e (patch) | |
tree | f066a688df2d64de276da2b10d22960ea429d533 /winsup/cygwin/thread.h | |
parent | e633eaec087cc723ce6af440ed8b91d44a35cf79 (diff) |
* Makefile.in (clean): Remove non-existant regexp dir.
* collate.h: New header.
(__collate_range_cmp): Declare.
(__collate_load_error): Define.
* glob.cc: Pull in latest version from FreeBSD. Simplify and reduce
Cygwin-specific changes.
* regex/regcomp.c: Include collate.h on Cygwin as well.
(__collate_range_cmp): Move from here...
* nlsfuncs.cc (__collate_range_cmp): ...to here.
* miscfuncs.cc (thread_wrapper): Fix typo in comment.
(CygwinCreateThread): Take dead zone of Windows stack into account.
Change the way how the stack is commited and how to handle guardpages.
Explain how and why.
* thread.h (PTHREAD_DEFAULT_STACKSIZE): Change definition. Explain why.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r-- | winsup/cygwin/thread.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 9adc9e1c7..ec3ca7ebf 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -16,10 +16,12 @@ details. */ #define WRITE_LOCK 1 #define READ_LOCK 2 -/* Default is a 1 Megs stack with a 4K guardpage. Since the pthread stacksize - does not include the guardpage size, but we don't want to waste another 64K, - subtract the default guardpage size from the stacksize. */ -#define PTHREAD_DEFAULT_STACKSIZE (1024 * 1024 - wincap.page_size ()) +/* Default is a 1 Megs stack with a 4K guardpage. The pthread stacksize + does not include the guardpage size, so we subtract the default guardpage + size. Additionally, the Windows stack handling disallows to use the last + two pages as guard page (tested on XP and W7). That results in a zone of + three pages which have to be subtract to get the actual stack size. */ +#define PTHREAD_DEFAULT_STACKSIZE (1024 * 1024 - 3 * wincap.page_size ()) #define PTHREAD_DEFAULT_GUARDSIZE (wincap.page_size ()) #include <pthread.h> |