summaryrefslogtreecommitdiff
path: root/ace/Synch_T.i
diff options
context:
space:
mode:
authorschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-01 08:00:34 +0000
committerschmidt <douglascraigschmidt@users.noreply.github.com>1997-01-01 08:00:34 +0000
commitea0d28240863caf437a18071bfd03e7b146c5ade (patch)
tree91b695852b885a5f44f9be8c3a22bbf7f5a96b8d /ace/Synch_T.i
parenta6e2ced2f5279e011b712995095a1712a29e22f0 (diff)
downloadATCD-ea0d28240863caf437a18071bfd03e7b146c5ade.tar.gz
foo
Diffstat (limited to 'ace/Synch_T.i')
-rw-r--r--ace/Synch_T.i68
1 files changed, 68 insertions, 0 deletions
diff --git a/ace/Synch_T.i b/ace/Synch_T.i
index 198975ee38a..252b90633f1 100644
--- a/ace/Synch_T.i
+++ b/ace/Synch_T.i
@@ -199,4 +199,72 @@ ACE_TSS<TYPE>::ts_get (void) const
return (TYPE *) &this->type_;
}
+// Explicitly destroy the lock.
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::remove (void)
+{
+ return this->lock_.remove ();
+}
+
+// Block the thread until the lock is acquired.
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::acquire (void)
+{
+ return this->lock_.acquire ();
+}
+
+// Conditionally acquire the lock (i.e., won't block).
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::tryacquire (void)
+{
+ return this->lock_.tryacquire ();
+}
+
+// Release the lock.
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::release (void)
+{
+ return this->lock_.release ();
+}
+
+// Block until the thread acquires a read lock. If the locking
+// mechanism doesn't support read locks then this just calls
+// <acquire>.
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::acquire_read (void)
+{
+ return this->lock_.acquire_read ();
+}
+
+// Block until the thread acquires a write lock. If the locking
+// mechanism doesn't support read locks then this just calls
+// <acquire>.
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::acquire_write (void)
+{
+ return this->lock_.acquire_write ();
+}
+
+// Conditionally acquire a read lock. If the locking mechanism
+// doesn't support read locks then this just calls <acquire>.
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::tryacquire_read (void)
+{
+ return this->lock_.tryacquire_read ();
+}
+
+// Conditionally acquire a write lock. If the locking mechanism
+// doesn't support read locks then this just calls <acquire>.
+
+template <class LOCKING_MECHANISM> int
+ACE_Lock_Adapter<LOCKING_MECHANISM>::acquire_write (void)
+{
+ return this->lock_.acquire_write ();
+}
+
#endif /* defined (ACE_HAS_THREADS) && defined (ACE_HAS_THREAD_SPECIFIC_STORAGE) */