Public Member Functions | Private Member Functions | Private Attributes

c_ipc_mutex Class Reference

Interprocess mutex class. More...

#include <ipc_mutex.h>

Inheritance diagram for c_ipc_mutex:
Collaboration diagram for c_ipc_mutex:

List of all members.

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_tm_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').

Detailed Description

Interprocess mutex class.

Author:
VooDooMan
Version:
1
Date:
2007-09-02
Parameters:
file_name Name of shared mmap'ed file (POSIX only)

Definition at line 71 of file ipc_mutex.h.


The documentation for this class was generated from the following files:

Generated on Sat Aug 7 2010 15:31:13 for VooDoo cIRCle by doxygen 1.7.1

Get VooDoo cIRCle at SourceForge.net. Fast, secure and Free Open Source software downloads