summaryrefslogtreecommitdiff
path: root/ace/Synch.i
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-24 22:06:31 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-12-24 22:06:31 +0000
commit3364a7e4a47c1c9f82bf143a8364d2e6dba9277d (patch)
treec28955d3a4f333b38f8b0544acf941b9941525b3 /ace/Synch.i
parentba8a6fdf2c36527de53d08074a3991dfe810b69f (diff)
downloadATCD-3364a7e4a47c1c9f82bf143a8364d2e6dba9277d.tar.gz
ACE_Thread_Mutex is already recursive on Win32. Let ACE_Recursive_Thread_Mutex take advantage of this.
Diffstat (limited to 'ace/Synch.i')
-rw-r--r--ace/Synch.i23
1 files changed, 23 insertions, 0 deletions
diff --git a/ace/Synch.i b/ace/Synch.i
index 50381619d9f..f08e8ad1104 100644
--- a/ace/Synch.i
+++ b/ace/Synch.i
@@ -513,6 +513,7 @@ ACE_Condition_Thread_Mutex::mutex (void)
return this->mutex_;
}
+#if !defined (ACE_WIN32)
ACE_INLINE int
ACE_Recursive_Thread_Mutex::remove (void)
{
@@ -552,6 +553,28 @@ ACE_Recursive_Thread_Mutex::tryacquire_write (void)
return tryacquire ();
}
+#else /* ACE_WIN32 */
+// The counter part of the following two functions for non-Win32 platforms
+// are located in file Synch.cpp
+ACE_thread_t
+ACE_Recursive_Thread_Mutex::get_thread_id (void)
+{
+ // @@ The structure CriticalSection in Win32 doesn't hold
+ // the thread handle of the thread that owns the lock. However
+ // it is still not clear at this point how to translate a
+ // thread handle to its corresponding thread id.
+ errno = ENOTSUP;
+ return ACE_OS::NULL_thread;
+}
+
+int
+ACE_Recursive_Thread_Mutex::get_nesting_level (void)
+{
+ return this->lock_.RecursionCount;
+}
+
+#endif /* ACE_WIN32 */
+
#endif /* ACE_HAS_THREADS */
// Explicitly destroy the mutex.