diff options
author | Christopher Faylor <me@cgf.cx> | 2005-03-08 05:05:02 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2005-03-08 05:05:02 +0000 |
commit | 18edcecfbf74f23bffeefcaca1722407f6a9f597 (patch) | |
tree | 659de52828393063ae25a9e158cef9a516bf2cd1 /winsup/cygwin/sync.h | |
parent | 453456187764ae9cd1911693bf4d68e85898b9cf (diff) | |
download | cygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.tar.gz cygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.tar.bz2 cygnal-18edcecfbf74f23bffeefcaca1722407f6a9f597.zip |
* dcrt0.cc (dll_crt0_0): Eliminate muto::init call.
* sync.h (locker): New, currently unused class.
(muto::init): Eliminate.
* sync.cc (muto::init): Ditto.
(muto::init): Eliminate critical section lock and instead use name as a guard
to prevent against multiple attempts to initialize the same muto.
* pinfo.cc (pinfo::init): Set myself procinfo when not execing and pid matches
windows pid or cygwin pid.
Diffstat (limited to 'winsup/cygwin/sync.h')
-rw-r--r-- | winsup/cygwin/sync.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/sync.h b/winsup/cygwin/sync.h index 90e70a243..f2f852c78 100644 --- a/winsup/cygwin/sync.h +++ b/winsup/cygwin/sync.h @@ -40,10 +40,15 @@ public: void upforgrabs () {tls = this;} // just set to an invalid address void grab () __attribute__ ((regparm (1))); static void set_exiting_thread () {exiting_thread = GetCurrentThreadId ();} - static void init (); }; -extern muto muto_start; +class locker +{ + muto *room; +public: + locker (muto *m) {room = m; room->acquire ();} + ~locker () {room->release ();} +}; /* Use a statically allocated buffer as the storage for a muto */ #define new_muto(__name) \ |