diff options
author | Christopher Faylor <me@cgf.cx> | 2004-03-07 04:57:47 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-03-07 04:57:47 +0000 |
commit | 3a1ccfc8c7e618eec1eb280a213282f1134eb2fb (patch) | |
tree | f394d22b8233c39ccb86f98b168cff560f9a7173 /winsup/cygwin/cygtls.h | |
parent | 2942097ac20fab2d8237e9f7004cd2153b6ac0af (diff) | |
download | cygnal-3a1ccfc8c7e618eec1eb280a213282f1134eb2fb.tar.gz cygnal-3a1ccfc8c7e618eec1eb280a213282f1134eb2fb.tar.bz2 cygnal-3a1ccfc8c7e618eec1eb280a213282f1134eb2fb.zip |
* fork.cc (fork_parent): Save parent pid in a temporary variable since child
could conceivably exit before function returns, rendering the child's shared
memory area invalid.
* cygtls.h (_cygtls::incyg): Declare new field.
(_cygtls::in_exception): Define new function.
* exceptions.cc (setup_handler): Remove locked flag. Use 'incyg' flag and
in_exception function to determine when we're in a cygwin function.
(_cygtls::call_signal_handler): Decrement incyg flag prior to calling a
handler. Increment it on return.
* gendef (_sigfe): Increment incyg flag. Use testl for zero testing rather
than orl, for consistency.
(_sigbe): Decrement incyg flag. Use testl for zero testing rather than orl,
for consistency.
(_cygtls::pop): Use testl for zero testing rather than orl, for consistency.
(stabilize_sig_stack): Ditto.
Diffstat (limited to 'winsup/cygwin/cygtls.h')
-rw-r--r-- | winsup/cygwin/cygtls.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/cygtls.h b/winsup/cygwin/cygtls.h index 444da265c..5e2576635 100644 --- a/winsup/cygwin/cygtls.h +++ b/winsup/cygwin/cygtls.h @@ -113,6 +113,7 @@ struct _cygtls int sig; unsigned stacklock; unsigned spinning; + unsigned incyg; __stack_t stack[TLS_STACK_SIZE]; unsigned padding[0]; @@ -126,7 +127,8 @@ struct _cygtls void remove (DWORD); void push (__stack_t, bool) __attribute__ ((regparm (3))); __stack_t pop () __attribute__ ((regparm (1))); - bool isinitialized () {return initialized == CYGTLS_INITIALIZED || initialized == CYGTLS_EXCEPTION;} + bool isinitialized () const {return initialized == CYGTLS_INITIALIZED || initialized == CYGTLS_EXCEPTION;} + bool in_exception () const {return initialized == CYGTLS_EXCEPTION;} void set_state (bool); void reset_exception (); bool interrupt_now (CONTEXT *, int, void *, struct sigaction&) |