diff options
author | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-08-16 09:36:07 +0000 |
---|---|---|
committer | mcorino <mcorino@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2012-08-16 09:36:07 +0000 |
commit | f25c7a2aa1e464b424ba5add600f9a3e0edc9ee2 (patch) | |
tree | 176c473ff67ebacacb932706101f3a4f46d352a4 /ACE/ace/Condition_Thread_Mutex.h | |
parent | 22a406258b246f6f07610d38f749ba3a8c7cbd7e (diff) | |
download | ATCD-f25c7a2aa1e464b424ba5add600f9a3e0edc9ee2.tar.gz |
ChangeLogTag: Thu Aug 16 09:22:31 UTC 2012 Martin Corino <mcorino@remedy.nl>
Diffstat (limited to 'ACE/ace/Condition_Thread_Mutex.h')
-rw-r--r-- | ACE/ace/Condition_Thread_Mutex.h | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/ACE/ace/Condition_Thread_Mutex.h b/ACE/ace/Condition_Thread_Mutex.h index b5a7ff20e21..d43541346d8 100644 --- a/ACE/ace/Condition_Thread_Mutex.h +++ b/ACE/ace/Condition_Thread_Mutex.h @@ -32,13 +32,14 @@ ACE_BEGIN_VERSIONED_NAMESPACE_DECL +template <class ACE_LOCK> class ACE_Condition; + class ACE_Time_Value; /** - * @class ACE_Condition_Thread_Mutex - * - * @brief ACE_Condition variable wrapper written using ACE_Mutexes. This - * allows threads to block until shared data changes state. + * @brief ACE_Condition template specialization written using + * ACE_Mutexes. This allows threads to block until shared data + * changes state. * A condition variable enables threads to atomically block and * test the condition under the protection of a mutual exclu- * sion lock (mutex) until the condition is satisfied. That is, @@ -50,26 +51,24 @@ class ACE_Time_Value; * up waiting threads by signaling the associated condition * variable. The waiting threads, upon awakening, reacquire the * mutex and re-evaluate the condition. - * - * This should be an instantiation of ACE_Condition but problems - * with compilers precludes this... */ -class ACE_Export ACE_Condition_Thread_Mutex +template <> +class ACE_Export ACE_Condition<ACE_Thread_Mutex> { public: /// Initialize the condition variable. - ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - const ACE_TCHAR *name = 0, - void *arg = 0); + ACE_Condition (ACE_Thread_Mutex &m, + const ACE_TCHAR *name = 0, + void *arg = 0); /// Initialize the condition variable. - ACE_Condition_Thread_Mutex (ACE_Thread_Mutex &m, - ACE_Condition_Attributes &attributes, - const ACE_TCHAR *name = 0, - void *arg = 0); + ACE_Condition (ACE_Thread_Mutex &m, + const ACE_Condition_Attributes &attributes, + const ACE_TCHAR *name = 0, + void *arg = 0); /// Implicitly destroy the condition variable. - ~ACE_Condition_Thread_Mutex (void); + ~ACE_Condition (void); /** * Explicitly destroy the condition variable. Note that only one @@ -130,10 +129,12 @@ protected: private: // = Prevent assignment and initialization. - void operator= (const ACE_Condition_Thread_Mutex &); - ACE_Condition_Thread_Mutex (const ACE_Condition_Thread_Mutex &); + void operator= (const ACE_Condition<ACE_Thread_Mutex> &); + ACE_Condition (const ACE_Condition<ACE_Thread_Mutex> &); }; +typedef ACE_Condition<ACE_Thread_Mutex> ACE_Condition_Thread_Mutex; + ACE_END_VERSIONED_NAMESPACE_DECL #if defined (__ACE_INLINE__) |