summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.h
diff options
context:
space:
mode:
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;