Interprocess mutex class. More...
#include <ipc_mutex.h>
Public Member Functions | |
c_ipc_mutex (const char *file_name) | |
virtual | ~c_ipc_mutex () |
string | get_error_log () |
Retrieves queued errors from IPC locking objects and then clears error queue. | |
unsigned long | get_timeout_cnt_and_reset () |
Retrieves contidion timeout count on semaphore (POSIX-only). | |
bool | ipc_works_on_this_platform () |
Retrieves whether inter-process locking (shared motex and condition) works on this platform. | |
virtual void | lock () |
virtual void | unlock () |
bool | was_created () |
Retrieves our role in exclusivity. | |
Private Member Functions | |
void | place_lock () |
bool | test_stale_lock_file () |
Private Attributes | |
string | error_log |
int | fd |
File descriptor of lock file. | |
semaphore_t * | m_semaphore |
Semaphore structure. | |
bool | m_was_created |
'true' if we are the first, i.e. created locking mmap'ed file with semaphore; 'false' if we just connected to already created locking file | |
unsigned long | timeout_cnt |
Number of time-outs (protected by 'm_cnt_mutex'). |
Interprocess mutex class.
file_name | Name of shared mmap'ed file (POSIX only) |
Definition at line 71 of file ipc_mutex.h.