summaryrefslogtreecommitdiff
path: root/ace/Reverse_Lock_T.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2005-05-31 01:11:28 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2005-05-31 01:11:28 +0000
commitaa91dc91c9d9db80539b42aedbd578d61b90df06 (patch)
tree012cc1ccde498e6986af2ab5dcf76a239683d897 /ace/Reverse_Lock_T.cpp
parentb75d5b247dad8a5fe0f1669bc27980a9b8680c27 (diff)
downloadATCD-aa91dc91c9d9db80539b42aedbd578d61b90df06.tar.gz
ChangeLogTag:Mon May 30 18:10:56 2005 Ossama Othman <ossama@dre.vanderbilt.edu>
Diffstat (limited to 'ace/Reverse_Lock_T.cpp')
-rw-r--r--ace/Reverse_Lock_T.cpp77
1 files changed, 72 insertions, 5 deletions
diff --git a/ace/Reverse_Lock_T.cpp b/ace/Reverse_Lock_T.cpp
index b2f6cef8c64..0dc093cf7a5 100644
--- a/ace/Reverse_Lock_T.cpp
+++ b/ace/Reverse_Lock_T.cpp
@@ -1,7 +1,7 @@
// $Id$
-#ifndef ACE_REVERSE_LOCK_T_C
-#define ACE_REVERSE_LOCK_T_C
+#ifndef ACE_REVERSE_LOCK_T_CPP
+#define ACE_REVERSE_LOCK_T_CPP
#include "ace/Reverse_Lock_T.h"
@@ -9,15 +9,82 @@
# pragma once
#endif /* ACE_LACKS_PRAGMA_ONCE */
-ACE_RCSID(ace, Reverse_Lock_T, "$Id$")
-
#if !defined (__ACE_INLINE__)
#include "ace/Reverse_Lock_T.inl"
#endif /* __ACE_INLINE__ */
+
template <class ACE_LOCKING_MECHANISM>
ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::~ACE_Reverse_Lock (void)
{
}
-#endif /* ACE_REVERSE_LOCK_T_C */
+// Explicitly destroy the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::remove (void)
+{
+ return this->lock_.remove ();
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire (void)
+{
+ return this->lock_.release ();
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+// Acquire the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::release (void)
+{
+ if (this->acquire_method_ == ACE_Acquire_Method::ACE_READ)
+ return this->lock_.acquire_read ();
+ else if (this->acquire_method_ == ACE_Acquire_Method::ACE_WRITE)
+ return this->lock_.acquire_write ();
+ else
+ return this->lock_.acquire ();
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_read (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_write (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_read (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_write (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+// Release the lock.
+template <class ACE_LOCKING_MECHANISM> int
+ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_write_upgrade (void)
+{
+ ACE_NOTSUP_RETURN (-1);
+}
+
+#endif /* ACE_REVERSE_LOCK_T_CPP */