* 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.
This commit is contained in:
Corinna Vinschen
2012-02-13 13:12:37 +00:00
parent e633eaec08
commit d7bcd2a16f
8 changed files with 167 additions and 121 deletions

View File

@ -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>