summaryrefslogtreecommitdiff
path: root/ace/Recursive_Thread_Mutex.inl
diff options
context:
space:
mode:
authordhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-04 03:53:54 +0000
committerdhinton <dhinton@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2003-08-04 03:53:54 +0000
commit937a0506cb1c0980eab5bcfdf266139e1c93e80c (patch)
tree12103be26b2e9b0cd1869d7fd72a1f8a8ec362e6 /ace/Recursive_Thread_Mutex.inl
parent868bea2cbe0807f9db59c1997ede86af27fbc8e3 (diff)
downloadATCD-937a0506cb1c0980eab5bcfdf266139e1c93e80c.tar.gz
ChangeLogTag:Mon Aug 4 03:26:30 UTC 2003 Don Hinton <dhinton@dresystems.com>
Diffstat (limited to 'ace/Recursive_Thread_Mutex.inl')
-rw-r--r--ace/Recursive_Thread_Mutex.inl60
1 files changed, 60 insertions, 0 deletions
diff --git a/ace/Recursive_Thread_Mutex.inl b/ace/Recursive_Thread_Mutex.inl
new file mode 100644
index 00000000000..312aa98b3c7
--- /dev/null
+++ b/ace/Recursive_Thread_Mutex.inl
@@ -0,0 +1,60 @@
+/* -*- C++ -*- */
+// $Id$
+
+ACE_INLINE ACE_recursive_thread_mutex_t &
+ACE_Recursive_Thread_Mutex::mutex (void)
+{
+ return lock_;
+}
+
+ACE_INLINE ACE_thread_mutex_t &
+ACE_Recursive_Thread_Mutex::get_nesting_mutex (void)
+{
+#if defined (ACE_HAS_RECURSIVE_MUTEXES)
+ return ACE_static_cast (ACE_thread_mutex_t &,
+ lock_);
+#else
+ return lock_.nesting_mutex_;
+#endif /* ACE_HAS_RECURSIVE_MUTEXES */
+}
+
+ACE_INLINE void
+ACE_Recursive_Thread_Mutex::set_thread_id (ACE_thread_t t)
+{
+// ACE_TRACE ("ACE_Recursive_Thread_Mutex::set_thread_id");
+#if defined (ACE_HAS_RECURSIVE_MUTEXES)
+ ACE_UNUSED_ARG (t);
+#else /* ! ACE_HAS_RECURSIVE_MUTEXES */
+ this->lock_.owner_id_ = t;
+#endif /* ! ACE_HAS_RECURSIVE_MUTEXES */
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::acquire_read (void)
+{
+ return this->acquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::acquire_write (void)
+{
+ return this->acquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::tryacquire_read (void)
+{
+ return this->tryacquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::tryacquire_write (void)
+{
+ return this->tryacquire ();
+}
+
+ACE_INLINE int
+ACE_Recursive_Thread_Mutex::tryacquire_write_upgrade (void)
+{
+ return 0;
+}