#ifndef ACE_LOCK_ADAPTER_T_CPP #define ACE_LOCK_ADAPTER_T_CPP #include "ace/Lock_Adapter_T.h" #include "ace/OS_Memory.h" // for ACE_NEW #if !defined (ACE_LACKS_PRAGMA_ONCE) # pragma once #endif /* ACE_LACKS_PRAGMA_ONCE */ #if !defined (__ACE_INLINE__) #include "ace/Lock_Adapter_T.inl" #endif /* __ACE_INLINE__ */ ACE_BEGIN_VERSIONED_NAMESPACE_DECL template ACE_Lock_Adapter::~ACE_Lock_Adapter () { if (this->delete_lock_) delete this->lock_; } // Explicitly destroy the lock. template int ACE_Lock_Adapter::remove () { return this->lock_->remove (); } // Block the thread until the lock is acquired. template int ACE_Lock_Adapter::acquire () { return this->lock_->acquire (); } // Conditionally acquire the lock (i.e., won't block). template int ACE_Lock_Adapter::tryacquire () { return this->lock_->tryacquire (); } // Release the lock. template int ACE_Lock_Adapter::release () { 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 // . template int ACE_Lock_Adapter::acquire_read () { 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 // . template int ACE_Lock_Adapter::acquire_write () { return this->lock_->acquire_write (); } // Conditionally acquire a read lock. If the locking mechanism // doesn't support read locks then this just calls . template int ACE_Lock_Adapter::tryacquire_read () { return this->lock_->tryacquire_read (); } // Conditionally acquire a write lock. If the locking mechanism // doesn't support write locks then this just calls . template int ACE_Lock_Adapter::tryacquire_write () { return this->lock_->tryacquire_write (); } // Conditionally try to upgrade a lock held for read to a write lock. // If the locking mechanism doesn't support read locks then this just // calls . Returns 0 on success, -1 on failure. template int ACE_Lock_Adapter::tryacquire_write_upgrade () { return this->lock_->tryacquire_write_upgrade (); } ACE_END_VERSIONED_NAMESPACE_DECL #endif /* ACE_LOCK_ADAPTER_T_CPP */