summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/cygtls.h
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-06-02 00:09:50 +0000
committerChristopher Faylor <me@cgf.cx>2006-06-02 00:09:50 +0000
commit2346864a451f0e82c26d083c1fee7c6df07edc68 (patch)
tree744e90adc1c975677be9e407f2fa86a8f0bfe2e3 /winsup/cygwin/cygtls.h
parent3e1290a3053d973bacb7cd2f82124e5c2d0352a2 (diff)
downloadcygnal-2346864a451f0e82c26d083c1fee7c6df07edc68.tar.gz
cygnal-2346864a451f0e82c26d083c1fee7c6df07edc68.tar.bz2
cygnal-2346864a451f0e82c26d083c1fee7c6df07edc68.zip
* cygheap.cc (cygheap_fixup_in_child): Don't close parent handle here. Let the
caller do that. * dcrt0.cc (child_info_spawn::handle_spawn): Close parent handle here to allow fixup_after_exec functions to use it. * cygtls.cc (_cygtls::call2): Avoid calling exit thread if called with *crt0_1 functions. * cygtls.h (_cygtls::isinitialized): Check that we actually have a tls before seeing if it is initialized. * gendef (_sigfe_maybe): Ditto. * dcrt0.cc (dll_crt0_1): Remove static, use just one argument. * dll_init.cc (dllcrt0_info): New structure. (dll_dllcrt0): Change into a front-end to renamed dll_dllcrt0_1 so that we'll always be assured of having something like a tls. (dll_dllcrt0_1): New function, basically renamed from from dll_dllcrt0. Unconditionally call _my_tls.init_exception_handler now that we are assured of having a tls. Change variable name from "linking" to "linked". * winsup.h (dll_crt0_1): Declare. (dll_dllcrt0_1): Ditto.
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r--winsup/cygwin/cygtls.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h
index 6379f8cec..0a3b06d6f 100644
--- a/winsup/cygwin/cygtls.h
+++ b/winsup/cygwin/cygtls.h
@@ -182,7 +182,11 @@ struct _cygtls
void push (__stack_t) __attribute__ ((regparm (2)));
__stack_t pop () __attribute__ ((regparm (1)));
__stack_t retaddr () {return stackptr[-1];}
- bool isinitialized () const {return initialized == CYGTLS_INITIALIZED;}
+ bool isinitialized () const
+ {
+ volatile char here;
+ return ((char *) this > &here) && initialized == CYGTLS_INITIALIZED;
+ }
bool interrupt_now (CONTEXT *, int, void *, struct sigaction&)
__attribute__((regparm(3)));
void __stdcall interrupt_setup (int sig, void *handler,