diff options
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r-- | winsup/cygwin/cygtls.h | 6 |
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, |