#include <RW_Process_Mutex.h>
Collaboration diagram for ACE_RW_Process_Mutex:

Public Member Functions | |
| ACE_RW_Process_Mutex (const ACE_TCHAR *name=0, int flags=O_CREAT|O_RDWR, mode_t mode=ACE_DEFAULT_OPEN_PERMS) | |
| ~ACE_RW_Process_Mutex (void) | |
| int | remove (void) |
| int | acquire (void) |
| Acquire lock ownership (wait on queue if necessary). | |
| int | tryacquire (void) |
| int | release (void) |
| Release lock and unblock a thread at head of queue. | |
| int | acquire_read (void) |
| Acquire lock ownership (wait on queue if necessary). | |
| int | acquire_write (void) |
| Acquire lock ownership (wait on queue if necessary). | |
| int | tryacquire_read (void) |
| int | tryacquire_write (void) |
| int | tryacquire_write_upgrade (void) |
| const ACE_File_Lock & | lock (void) const |
| Return the underlying lock. | |
| void | dump (void) const |
| Dump the state of an object. | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. | |
Private Member Functions | |
| const ACE_TCHAR * | unique_name (void) |
| Create and return the unique name. | |
Private Attributes | |
| ACE_TCHAR | name_ [ACE_UNIQUE_NAME_LEN] |
| ACE_File_Lock | lock_ |
| We need this to get the readers/writer semantics... | |
Note that because this class uses the <ace_file_lock> as its implementation it only can be reliably used between separate processes, rather than threads in the same process. This isn't a limitation of ACE, it's simply the file lock semantics on UNIX and Win32.
|
||||||||||||||||
|
Create a readers/writer <process_mutex>, passing in the optional <name>, <flags> and <mode>
|
|
|
|
|
|
Acquire lock ownership (wait on queue if necessary).
|
|
|
Acquire lock ownership (wait on queue if necessary).
|
|
|
Acquire lock ownership (wait on queue if necessary).
|
|
|
Dump the state of an object.
|
|
|
Return the underlying lock.
|
|
|
Release lock and unblock a thread at head of queue.
|
|
|
Explicitly destroy the mutex. Note that only one thread should call this method since it doesn't protect against race conditions. |
|
|
Conditionally acquire lock (i.e., don't wait on queue). Returns -1 on failure. If we "failed" because someone else already had the lock, <errno> is set to <ebusy>. |
|
|
Conditionally acquire a lock (i.e., won't block). Returns -1 on failure. If we "failed" because someone else already had the lock, <errno> is set to <ebusy>. |
|
|
Conditionally acquire a lock (i.e., won't block). Returns -1 on failure. If we "failed" because someone else already had the lock, <errno> is set to <ebusy>. |
|
|
Attempt to upgrade a read lock to a write lock. Returns 0 on success, -1 on failure. |
|
|
Create and return the unique name.
|
|
|
Declare the dynamic allocation hooks.
|
|
|
We need this to get the readers/writer semantics...
|
|
|
If the user does not provide a name we generate a unique name in this buffer. |
1.3.9.1