#include <Process_Mutex.h>
Collaboration diagram for ACE_Process_Mutex:

Public Methods | |
| ACE_Process_Mutex (const char *name=0, void *arg=0) | |
Create a Process_Mutex, passing in the optional name. More... | |
| ACE_Process_Mutex (const wchar_t *name, void *arg=0) | |
Create a Process_Mutex, passing in the optional name. More... | |
| ~ACE_Process_Mutex (void) | |
| int | remove (void) |
| Explicitly destroy the mutex. More... | |
| int | acquire (void) |
| Acquire lock ownership (wait on queue if necessary). More... | |
| int | acquire (ACE_Time_Value &tv) |
| Acquire lock ownership, but timeout if lock if hasn't been acquired by given time. More... | |
| int | tryacquire (void) |
| Conditionally acquire lock (i.e., don't wait on queue). More... | |
| int | release (void) |
| Release lock and unblock a thread at head of queue. More... | |
| int | acquire_read (void) |
| Acquire lock ownership (wait on queue if necessary). More... | |
| int | acquire_write (void) |
| Acquire lock ownership (wait on queue if necessary). More... | |
| int | tryacquire_read (void) |
| Conditionally acquire a lock (i.e., won't block). More... | |
| int | tryacquire_write (void) |
| Conditionally acquire a lock (i.e., won't block). More... | |
| int | tryacquire_write_upgrade (void) |
| This is only here for consistency with the other synchronization APIs and usability with Lock adapters. More... | |
| const ACE_mutex_t & | lock (void) const |
| Return the underlying mutex. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Attributes | |
| ACE_Mutex | lock_ |
ACE_Process_Mutex is based can be configured at build time to be either ACE_SV_Semaphore_Complex (on platforms that support it) or ACE_Mutex. On platforms that require interprocess mutexes be allocated from shared memory (Pthreads and UI Threads are examples), ACE_SV_Semaphore_Complex provides a more reliable mechanism for implementing inter-process mutex than ACE_Mutex. However, at least on some platforms, ACE_SV_Semaphore_Complex is limited to a small number of objects by the underlying System V IPC kernel parameters. If you want to force use of ACE_Mutex as the underlying mechanism, set ACE_USES_MUTEX_FOR_PROCESS_MUTEX in your config.h file. Also, if you require the ability to do a timed acquire(), you must set ACE_USES_MUTEX_FOR_PROCESS_MUTEX, as timed acquire does not work with System V semaphores.
|
||||||||||||
|
Create a Process_Mutex, passing in the optional
|
|
||||||||||||
|
Create a Process_Mutex, passing in the optional
(
|
|
|
|
|
|
Acquire lock ownership, but timeout if lock if hasn't been acquired by given time.
|
|
|
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 mutex.
|
|
|
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).
|
|
|
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>. |
|
|
This is only here for consistency with the other synchronization APIs and usability with Lock adapters. Assumes the caller already has acquired the mutex and returns 0 in all cases. |
|
|
Declare the dynamic allocation hooks.
|
|
|
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001