Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

ACE_Local_Mutex Class Reference

Class that acquires, renews, and releases a synchronization token local to the process. More...

#include <Local_Tokens.h>

Inheritance diagram for ACE_Local_Mutex:

Inheritance graph
Collaboration diagram for ACE_Local_Mutex:

Collaboration graph
List of all members.

Public Methods

 ACE_Local_Mutex (const ACE_TCHAR *token_name=0, int ignore_deadlock=0, int debug=0)
 ~ACE_Local_Mutex (void)

void dump (void) const
 Dump the state of the class.

virtual ACE_Token_Proxyclone (void) const
 Return deep copy.

Protected Methods

virtual ACE_Tokenscreate_token (const ACE_TCHAR *name)
 Return a new ACE_Local_Mutex.

Detailed Description

Class that acquires, renews, and releases a synchronization token local to the process.

This class is a more general-purpose synchronization mechanism than SunOS 5.x mutexes. For example, it implements "recursive mutex" 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 mutexes don't strictly enforce an acquisition order). Lastly, ACE_Local_Mutex performs deadlock detection on acquire calls. The interfaces for acquire, tryacquire, renew, release, etc. are defined in ACE_Token_Proxy. The semantics for ACE_Local_Mutex are that of a mutex.

Constructor & Destructor Documentation

ACE_Local_Mutex::ACE_Local_Mutex const ACE_TCHAR   token_name = 0,
int    ignore_deadlock = 0,
int    debug = 0


token_name  Uniquely id's the token.
ignore_deadlock  Will allow deadlock to occur (useful for testing).
debug  Prints a bunch of messages.

ACE_Local_Mutex::~ACE_Local_Mutex void   


Member Function Documentation

virtual ACE_Token_Proxy* ACE_Local_Mutex::clone void    const [virtual]

Return deep copy.

Implements ACE_Token_Proxy.

virtual ACE_Tokens* ACE_Local_Mutex::create_token const ACE_TCHAR   name [protected, virtual]

Return a new ACE_Local_Mutex.

Implements ACE_Token_Proxy.

void ACE_Local_Mutex::dump void    const

Dump the state of the class.

Reimplemented from ACE_Token_Proxy.

The documentation for this class was generated from the following file:
Generated on Fri Apr 2 16:49:28 2004 for ACE by doxygen1.2.18