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>2000-05-18 07:20:01 +0400
committerChristopher Faylor <me@cgf.cx>2000-05-18 07:20:01 +0400
commit12e659efa8f172167a526f251e36571f6f976740 (patch)
treeaf0e1b0e10b0d1f85074c9a0bc2fd3aadb4fe17e /winsup/cygwin/sigproc.h
parent2dc173fe91dfdf9fbf2844f54bb064f43a8c0004 (diff)
* dcrt0.cc (dll_crt0_1): Initialize mainthread stuff here before anything needs
it. * sigproc.cc (sigproc_init): Move mainthread initialization out of here. * sigproc.h (sigthread): Add init() method. (sigframe): Don't try to initialize muto. * sync.cc: Undef WaitForSingleObject to avoid recursion.
Diffstat (limited to 'winsup/cygwin/sigproc.h')
-rw-r--r--winsup/cygwin/sigproc.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.h b/winsup/cygwin/sigproc.h
index eee35748f..3f713c348 100644
--- a/winsup/cygwin/sigproc.h
+++ b/winsup/cygwin/sigproc.h
@@ -40,6 +40,11 @@ struct sigthread
DWORD frame;
muto *lock;
sigthread () : id (0), frame (0), lock (0) {}
+ void init (const char *s)
+ {
+ lock = new_muto (FALSE, s);
+ id = GetCurrentThreadId ();
+ }
};
class sigframe
@@ -50,8 +55,6 @@ private:
public:
void set (sigthread &t, int up = 1)
{
- if (!t.lock)
- t.lock = new_muto (FALSE, "sigthread");
t.lock->acquire ();
st = &t;
t.frame = (DWORD) (up ? __builtin_frame_address (1) :