#include <Local_Tokens.h>
Inheritance diagram for ACE_Local_WLock:
Public Member Functions | |
ACE_Local_WLock (const ACE_TCHAR *token_name=0, int ignore_deadlock=0, int debug=0) | |
~ACE_Local_WLock (void) | |
Destructor. | |
void | dump (void) const |
Dump the state of the class. | |
virtual int | type (void) const |
Returns ACE_RW_Token::WLOCK. | |
virtual ACE_Token_Proxy * | clone (void) const |
Return deep copy. | |
Protected Member Functions | |
ACE_Tokens * | create_token (const ACE_TCHAR *name) |
Return a new ACE_Local_Mutex. |
This class implements the writer interface to canonical readers/writer locks. Multiple readers can hold the lock simultaneously when no writers have the lock. Alternatively, when a writer holds the lock, no other participants (readers or writers) may hold the lock. This class is a more general-purpose synchronization mechanism than SunOS 5.x WLock. For example, it implements "recursive WLock" semantics, where a thread that owns the token can reacquire it without deadlocking. In addition, threads that are blocked awaiting the token are serviced in strict FIFO order as other threads release the token (SunOS 5.x WLocks don't strictly enforce an acquisition order). The interfaces for acquire, tryacquire, renew, release, etc. are defined in ACE_Token_Proxy. The semantics for ACE_Local_WLock are that of a readers/writers lock. Acquire for this class implies a writer acquisition. That is, only one client may hold the lock for writing.
Definition at line 1081 of file Local_Tokens.h.
|
Constructor.
|
|
Destructor.
Definition at line 1582 of file Local_Tokens.cpp.
01583 { 01584 } |
|
Return deep copy.
Implements ACE_Token_Proxy. Definition at line 1603 of file Local_Tokens.cpp. References ACE_NEW_RETURN, and ACE_Tokens::name().
01604 { 01605 ACE_Token_Proxy *temp = 0; 01606 ACE_NEW_RETURN (temp, 01607 ACE_Local_WLock (token_->name (), 01608 ignore_deadlock_, 01609 debug_), 01610 0); 01611 return temp; 01612 } |
|
Return a new ACE_Local_Mutex.
Implements ACE_Token_Proxy. Definition at line 1587 of file Local_Tokens.cpp. References ACE_NEW_RETURN, and ACE_TCHAR.
01588 { 01589 ACE_Tokens *temp = 0; 01590 ACE_NEW_RETURN (temp, 01591 ACE_RW_Token (name), 01592 0); 01593 return temp; 01594 } |
|
Dump the state of the class.
Reimplemented from ACE_Token_Proxy. |
|
Returns ACE_RW_Token::WLOCK.
Reimplemented from ACE_Token_Proxy. Definition at line 1597 of file Local_Tokens.cpp.
01598 { 01599 return ACE_RW_Token::WRITER; 01600 } |