From 06175d0acdad6559a178b68ee8c46ba6356b5568 Mon Sep 17 00:00:00 2001 From: Robert Collins Date: Mon, 30 Sep 2002 11:43:43 +0000 Subject: 2002-09-30 Robert Collins * 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. --- winsup/cygwin/thread.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/thread.h') 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 -- cgit v1.2.3