UNIVERS
15.3
UNIVERS base processing software API
|
#include <pep_ipc.H>
Public Member Functions | |
LockBlock (int elem_cnt, key_t k_sem) | |
LockBlock (int elem_cnt) | |
virtual | ~LockBlock () |
void | lock (int id) |
void | unlock (int id) |
int | resources () |
void | force_destroy () |
virtual int | attach_cnt () |
Public Member Functions inherited from ObjectIPC | |
ObjectIPC (key_t id_k) | |
virtual key_t | key () |
Additional Inherited Members | |
Protected Member Functions inherited from ObjectIPC | |
void | new_key () |
Used for independent locking of vector elements. Each element is resource representation. Locking of an element means that other concurrent processes that use the same object to be aware of synchronous access will wait during lock() method until unlock() will be called.
LockBlock::LockBlock | ( | int | elem_cnt, |
key_t | k_sem | ||
) |
Access to existant locking block and check it for min count of elements if elem_cnt = 0
LockBlock::LockBlock | ( | int | elem_cnt | ) |
Create new locking block for pointed count of elements
|
virtual |
If this object has the last connection with the semaphore it delete sem_id
|
virtual |
Returns count of attached processes (users)
Reimplemented from ObjectIPC.
|
inline |
Disable destruction of a semaphore due to existant attachments
void LockBlock::lock | ( | int | id | ) |
Lock resource with pointed id
int LockBlock::resources | ( | ) |
Return count of handled resources
void LockBlock::unlock | ( | int | id | ) |
Unlock without any checking of validity