#include <Synch_T.h>
Inheritance diagram for ACE_Guard:
Public Methods | |
ACE_Guard (ACE_LOCK &l) | |
ACE_Guard (ACE_LOCK &l, int block) | |
Implicitly and automatically acquire (or try to acquire) the lock. If <block> is non-0 then <acquire> the <ACE_LOCK>, else <tryacquire> it. More... | |
ACE_Guard (ACE_LOCK &l, int block, int become_owner) | |
Initialise the guard without implicitly acquiring the lock. The <become_owner> parameter indicates whether the guard should release the lock implicitly on destruction. The <block> parameter is ignored and is used here to disambiguate with the preceding constructor. More... | |
~ACE_Guard (void) | |
Implicitly release the lock. More... | |
int | acquire (void) |
Explicitly acquire the lock. More... | |
int | tryacquire (void) |
Conditionally acquire the lock (i.e., won't block). More... | |
int | release (void) |
Explicitly release the lock, but only if it is held! More... | |
void | disown (void) |
Relinquish ownership of the lock so that it is not released implicitly in the destructor. More... | |
int | locked (void) const |
1 if locked, 0 if couldn't acquire the lock (errno will contain the reason for this). More... | |
int | remove (void) |
Explicitly remove the lock. More... | |
void | dump (void) const |
Dump the state of an object. More... | |
Protected Methods | |
ACE_Guard (ACE_LOCK *lock) | |
Helper, meant for subclass only. More... | |
Protected Attributes | |
ACE_LOCK * | lock_ |
Pointer to the ACE_LOCK we're guarding. More... | |
int | owner_ |
Keeps track of whether we acquired the lock or failed. More... | |
Private Methods | |
void | operator= (const ACE_Guard< ACE_LOCK > &) |
ACE_Guard (const ACE_Guard< ACE_LOCK > &) |
The <ACE_LOCK> class given as an actual parameter must provide at the very least the <acquire>, <tryacquire>, <release>, and <remove> methods.
|
|
|
Implicitly and automatically acquire (or try to acquire) the lock. If <block> is non-0 then <acquire> the <ACE_LOCK>, else <tryacquire> it.
|
|
Initialise the guard without implicitly acquiring the lock. The <become_owner> parameter indicates whether the guard should release the lock implicitly on destruction. The <block> parameter is ignored and is used here to disambiguate with the preceding constructor.
|
|
Implicitly release the lock.
|
|
Helper, meant for subclass only.
|
|
|
|
Explicitly acquire the lock.
Reimplemented in ACE_Write_Guard, and ACE_Read_Guard. |
|
Relinquish ownership of the lock so that it is not released implicitly in the destructor.
|
|
Dump the state of an object.
Reimplemented in ACE_Write_Guard, and ACE_Read_Guard. |
|
1 if locked, 0 if couldn't acquire the lock (errno will contain the reason for this).
|
|
|
|
Explicitly release the lock, but only if it is held!
|
|
Explicitly remove the lock.
|
|
Conditionally acquire the lock (i.e., won't block).
Reimplemented in ACE_Write_Guard, and ACE_Read_Guard. |
|
Pointer to the ACE_LOCK we're guarding.
|
|
Keeps track of whether we acquired the lock or failed.
|