diff options
author | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-02-19 21:44:14 +0000 |
---|---|---|
committer | schmidt <douglascraigschmidt@users.noreply.github.com> | 1999-02-19 21:44:14 +0000 |
commit | 56a3fc5530e7a805025c6f19aa9c872b21ddff32 (patch) | |
tree | 65e832a44b9c7be70fe7104331ef40ee60886371 /ace/Synch.h | |
parent | 539aaef2891d735228eaad57507ed73f0b785aa7 (diff) | |
download | ATCD-56a3fc5530e7a805025c6f19aa9c872b21ddff32.tar.gz |
.
Diffstat (limited to 'ace/Synch.h')
-rw-r--r-- | ace/Synch.h | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/ace/Synch.h b/ace/Synch.h index d6aebc122a1..070ef5ba363 100644 --- a/ace/Synch.h +++ b/ace/Synch.h @@ -1235,22 +1235,10 @@ private: }; class ACE_Export ACE_Recursive_Thread_Mutex -#if defined (ACE_WIN32) - : public ACE_Thread_Mutex -#endif /* ACE_WIN32 */ { // = TITLE - // Implement a C++ wrapper that allows calls to class - // <ACE_Thread_Mutex> to be nested for a nested acquire() that - // occurs in the same thread. - // - // = DESCRIPTION - // This class should be a specialization of the - // ACE_Recursive_Lock template class, but problems with some C++ - // compilers preclude this. This implementation is based - // on an algorithm sketched by Dave Butenhof <butenhof@zko.dec.com>. - // Naturally, I take the credit for any mistakes ;-) - // friend class ACE_Condition<class ACE_COND_MUTEX>; + // Implement a C++ wrapper that allows nested acquisition and + // release of a mutex that occurs in the same thread. public: ACE_Recursive_Thread_Mutex (LPCTSTR name = 0, void *arg = 0); @@ -1259,7 +1247,6 @@ public: ~ACE_Recursive_Thread_Mutex (void); // Implicitly release a recursive mutex. -#if !defined (ACE_WIN32) int remove (void); // Implicitly release a recursive mutex. @@ -1303,7 +1290,6 @@ public: // Releases a recursive mutex (will not release mutex until all the // nesting level drops to 0, which means the mutex is no longer // held). -#endif /* ! ACE_WIN32 */ ACE_thread_t get_thread_id (void); // Return the id of the thread that currently owns the mutex. @@ -1314,7 +1300,6 @@ public: // The nesting level is incremented every time the thread acquires // the mutex recursively. -#if !defined (ACE_WIN32) void dump (void) const; // Dump the state of an object. @@ -1322,22 +1307,11 @@ public: // Declare the dynamic allocation hooks. protected: - // These methods should *not* be public (they hold no locks...) + // = This method should *not* be public (they hold no locks...) void set_thread_id (ACE_thread_t t); - ACE_Thread_Mutex nesting_mutex_; - // Guards the state of the nesting level and thread id. - - ACE_Condition_Thread_Mutex lock_available_; - // This is the condition variable that actually suspends other - // waiting threads until the mutex is available. - - int nesting_level_; - // Current nesting level of the recursion. - - ACE_thread_t owner_id_; - // Current owner of the lock. -#endif /* ! ACE_WIN32 */ + ACE_recursive_thread_mutex_t recursive_mutex_; + // Recursive mutex. int removed_; // Keeps track of whether <remove> has been called yet to avoid |