1 #ifndef ACE_REVERSE_LOCK_T_CPP
2 #define ACE_REVERSE_LOCK_T_CPP
4 #include "ace/Reverse_Lock_T.h"
6 #if !defined (ACE_LACKS_PRAGMA_ONCE)
8 #endif /* ACE_LACKS_PRAGMA_ONCE */
10 #if !defined (__ACE_INLINE__)
11 #include "ace/Reverse_Lock_T.inl"
12 #endif /* __ACE_INLINE__ */
14 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
16 // Explicitly destroy the lock.
17 template <class ACE_LOCKING_MECHANISM
> int
18 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::remove ()
20 return this->lock_
.remove ();
24 template <class ACE_LOCKING_MECHANISM
> int
25 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::acquire ()
27 return this->lock_
.release ();
31 template <class ACE_LOCKING_MECHANISM
> int
32 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::tryacquire ()
34 ACE_NOTSUP_RETURN (-1);
38 template <class ACE_LOCKING_MECHANISM
> int
39 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::release ()
41 if (this->acquire_method_
== ACE_Acquire_Method::ACE_READ
)
42 return this->lock_
.acquire_read ();
43 else if (this->acquire_method_
== ACE_Acquire_Method::ACE_WRITE
)
44 return this->lock_
.acquire_write ();
46 return this->lock_
.acquire ();
50 template <class ACE_LOCKING_MECHANISM
> int
51 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::acquire_read ()
53 ACE_NOTSUP_RETURN (-1);
57 template <class ACE_LOCKING_MECHANISM
> int
58 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::acquire_write ()
60 ACE_NOTSUP_RETURN (-1);
64 template <class ACE_LOCKING_MECHANISM
> int
65 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::tryacquire_read ()
67 ACE_NOTSUP_RETURN (-1);
71 template <class ACE_LOCKING_MECHANISM
> int
72 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::tryacquire_write ()
74 ACE_NOTSUP_RETURN (-1);
78 template <class ACE_LOCKING_MECHANISM
> int
79 ACE_Reverse_Lock
<ACE_LOCKING_MECHANISM
>::tryacquire_write_upgrade ()
81 ACE_NOTSUP_RETURN (-1);
84 ACE_END_VERSIONED_NAMESPACE_DECL
86 #endif /* ACE_REVERSE_LOCK_T_CPP */