diff options
author | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-23 00:41:52 +0000 |
---|---|---|
committer | irfan <irfan@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1999-04-23 00:41:52 +0000 |
commit | 458f76a72a231417e776ed6a20f932a50436d2e2 (patch) | |
tree | 6ef4f0e1065a9f49c7907e78c812fb67a662530c /ace/Synch_T.i | |
parent | 360530198734e692ed06ceb5e4dc5473cce03528 (diff) | |
download | ATCD-458f76a72a231417e776ed6a20f932a50436d2e2.tar.gz |
Thu Apr 22 19:30:01 1999 Irfan Pyarali <irfan@cs.wustl.edu>
Diffstat (limited to 'ace/Synch_T.i')
-rw-r--r-- | ace/Synch_T.i | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/ace/Synch_T.i b/ace/Synch_T.i index c4e1b9d8d06..ff2a78115b4 100644 --- a/ace/Synch_T.i +++ b/ace/Synch_T.i @@ -161,6 +161,76 @@ ACE_Lock_Adapter<ACE_LOCKING_MECHANISM>::tryacquire_write (void) return this->lock_->tryacquire_write (); } +template <class ACE_LOCKING_MECHANISM> ACE_INLINE +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::ACE_Reverse_Lock (ACE_LOCKING_MECHANISM &lock) + : lock_ (&lock), + delete_lock_ (0) +{ +} + +template <class ACE_LOCKING_MECHANISM> ACE_INLINE +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::~ACE_Reverse_Lock (void) +{ + if (this->delete_lock_) + delete this->lock_; +} + +// Explicitly destroy the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::remove (void) +{ + return this->lock_->remove (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire (void) +{ + return this->lock_->release (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire (void) +{ + return this->lock_->tryacquire (); +} + +// Acquire the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::release (void) +{ + return this->lock_->acquire (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_read (void) +{ + return this->lock_->acquire_read (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::acquire_write (void) +{ + return this->lock_->acquire_write (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_read (void) +{ + return this->lock_->tryacquire_read (); +} + +// Release the lock. +template <class ACE_LOCKING_MECHANISM> ACE_INLINE int +ACE_Reverse_Lock<ACE_LOCKING_MECHANISM>::tryacquire_write (void) +{ + return this->lock_->tryacquire_write (); +} + #if defined (ACE_HAS_THREADS) template<class MUTEX> ACE_INLINE int |