diff options
author | Robert Collins <rbtcollins@hotmail.com> | 2002-09-30 11:43:43 +0000 |
---|---|---|
committer | Robert Collins <rbtcollins@hotmail.com> | 2002-09-30 11:43:43 +0000 |
commit | 06175d0acdad6559a178b68ee8c46ba6356b5568 (patch) | |
tree | 9bdfc17096c7880ed1d6e6210f2ca4574351c557 /winsup/cygwin/thread.h | |
parent | 1f3e9931a5cc6878eb99f3090160667a3d753ad6 (diff) | |
download | cygnal-06175d0acdad6559a178b68ee8c46ba6356b5568.tar.gz cygnal-06175d0acdad6559a178b68ee8c46ba6356b5568.tar.bz2 cygnal-06175d0acdad6559a178b68ee8c46ba6356b5568.zip |
2002-09-30 Robert Collins <rbtcollins@hotmail.com>
* thread.cc (pthread_mutex::initMutex): Use the wrapper init call.
(pthread_mutex::nativeMutex::init): Implement.
(pthread_mutex::nativeMutex::lock): Ditto.
(pthread_mutex::nativeMutex::unlock): Ditto.
(pthread_mutex::init): Use the wrapper lock and unlockcalls.
* thread.h (pthread_mutex): Move mutexInitializationLock into a
nativeMutex wrapper class.
Diffstat (limited to 'winsup/cygwin/thread.h')
-rw-r--r-- | winsup/cygwin/thread.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/winsup/cygwin/thread.h b/winsup/cygwin/thread.h index 9490ee947..c23e5a039 100644 --- a/winsup/cygwin/thread.h +++ b/winsup/cygwin/thread.h @@ -309,7 +309,15 @@ public: pthread_mutex (pthread_mutex_t *, pthread_mutexattr *); ~pthread_mutex (); private: - static HANDLE mutexInitializationLock; + class nativeMutex { + public: + bool init(); + bool lock(); + void unlock(); + private: + HANDLE theHandle; + }; + static nativeMutex mutexInitializationLock; }; class pthread:public verifyable_object |