diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-05-20 11:23:11 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-05-20 11:23:11 +0400 |
commit | 89d3c72d510b4e254b38b15865d921d45b26d80a (patch) | |
tree | 8be3d82b93084d305beae6c87019bb8d192e4b44 /winsup/cygwin/child_info.h | |
parent | 660302eb67bc951f9a4e543f4b5d02450eea10e2 (diff) |
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
(class child_info_fork): Remove stacksize, add stackaddr and guardsize
members.
* dcrt0.cc (child_info_fork::alloc_stack_hard_way): Partial rewrite
to regenerate the stack exactly as in the parent.
(child_info_fork::alloc_stack): Set stackaddr to 0, rather than
stacksize.
(dll_crt0_1): Check for stackaddr before changing the stack addresses
in the TEB.
* fork.cc (frok::child): Check for stackaddr here.
(frok::parent): Set ch.stackaddr and ch.guardsize if not called from
the main thread.
* init.cc (dll_entry): Replace pointer to NT_TIB with pointer to TEB.
Fix incorrectly changed address test before removing _my_tls.
Set StackLimit to NULL on Windows 2000. Explain why.
* miscfuncs.cc (struct thread_wrapper_arg): Store stackbase rather
than stacksize, store commitaddr, remove guardsize. Store all pointers
as char * for easier address arithmetic.
(thread_wrapper): Rewrite to remove OS stack before calling thread
function. Add lots of comments to explain what we do.
(CygwinCreateThread): Reserve our own stack in case we got no
application stack. Add comments.
* ntdll.h (struct _TEB): Extend defintion up to DeallocationStack
member.
* thread.cc (pthread_attr::pthread_attr): Use "(size_t) -1"
rather then 0xffffffff.
* wincap.h (wincaps::has_stack_size_param_is_a_reservation): New
element.
* wincap.cc: Implement above element throughout.
Diffstat (limited to 'winsup/cygwin/child_info.h')
-rw-r--r-- | winsup/cygwin/child_info.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 44767edc9..2bf89c183 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -37,7 +37,7 @@ enum child_status #define EXEC_MAGIC_SIZE sizeof(child_info) /* Change this value if you get a message indicating that it is out-of-sync. */ -#define CURR_CHILD_INFO_MAGIC 0xe850717aU +#define CURR_CHILD_INFO_MAGIC 0xbdf5842aU /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -80,10 +80,12 @@ class child_info_fork: public child_info { public: HANDLE forker_finished;// for synchronization with child - DWORD stacksize; // size of parent stack jmp_buf jmp; // where child will jump to + void *stackaddr; // address of parent stack void *stacktop; // location of top of parent stack void *stackbottom; // location of bottom of parent stack + size_t guardsize; // size of POSIX guard region or (size_t) -1 if + // user stack char filler[4]; child_info_fork (); void handle_fork () __attribute__ ((regparm (1)));; |