Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2001-04-01 04:06:17 +0400
committerChristopher Faylor <me@cgf.cx>2001-04-01 04:06:17 +0400
commitf611148366ee3934d16824f8a973177aaece0aa8 (patch)
treeb27e26f288e5497966f358cb47783a1bff9a5d19 /winsup/cygwin/sigproc.h
parentab57d1463946e37a5b7ce25498b3b42c3f617666 (diff)
* sigproc.h (class sigframe): Implement 'unregister()' method.
(sigframe::~sigframe): Use unregister method. (sigframe::call_signal_handler): Declare new method. * exceptions.cc (sigframe::call_signal_handler): New method. Unregisters current sigframe before calling signal handler. (setup_handler): Clear waiting threads prior to arming signal_arrived. * syscalls.cc (_read): Change goto to loop. Recalculate sigframe inside of loop so that constructor is called when appropriate. * wait.cc (wait4): Ditto. * signal.cc: Change "sig" to "signal" in debugging messages throughout. * sigproc.cc: Ditto.
Diffstat (limited to 'winsup/cygwin/sigproc.h')
-rw-r--r--winsup/cygwin/sigproc.h22
1 files changed, 14 insertions, 8 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index c67574d5b..1543aa1cf 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -49,6 +49,17 @@ class sigframe
{
private:
sigthread *st;
+ void unregister ()
+ {
+ if (st)
+ {
+ EnterCriticalSection (&st->lock);
+ st->frame = 0;
+ st->release_winapi_lock ();
+ LeaveCriticalSection (&st->lock);
+ st = NULL;
+ }
+ }
public:
void set (sigthread &t, DWORD ebp)
@@ -70,15 +81,10 @@ public:
}
~sigframe ()
{
- if (st)
- {
- EnterCriticalSection (&st->lock);
- st->frame = 0;
- st->release_winapi_lock ();
- LeaveCriticalSection (&st->lock);
- st = NULL;
- }
+ unregister ();
}
+
+ int call_signal_handler ();
};
extern sigthread mainthread;