UNIVERS
15.3
UNIVERS base processing software API
Main Page
Namespaces
Classes
Files
Examples
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
csi
pep_ipc.H
1
/* pep_ipc.H */
2
/* $Id: pep_ipc.H,v 1.3 2003/03/17 10:03:17 vlad Exp $ */
3
#ifndef __pep_ipc_H
4
#define __pep_ipc_H
5
6
#include <mix/mutex.h>
7
#include <csi/keysourcer.h>
8
9
14
class
ObjectIPC
15
{
16
private
:
17
18
key_t access_k;
20
protected
:
21
23
void
new_key
()
24
{ access_k = KS_GetUniqueKey(); }
25
26
public
:
27
28
ObjectIPC
()
29
{
new_key
(); }
30
31
ObjectIPC
(key_t id_k)
32
{ access_k = id_k; }
33
35
virtual
key_t
key
()
36
{
return
access_k; }
37
40
virtual
int
attach_cnt
()
41
{
return
0; }
42
43
};
44
45
54
class
LockBlock
:
public
ObjectIPC
55
{
56
private
:
57
58
int
sem_id;
59
MutexId mxid;
60
Logic destroy_flag;
63
public
:
64
67
LockBlock
(
int
elem_cnt, key_t k_sem);
69
LockBlock
(
int
elem_cnt);
72
virtual
~LockBlock
();
73
75
void
lock
(
int
id
);
76
78
void
unlock
(
int
id
);
79
81
int
resources
();
82
84
void
force_destroy
()
85
{ destroy_flag = TRUE; }
86
88
virtual
int
attach_cnt
();
89
90
};
91
92
93
#endif
/* pep_ipc.H */
LockBlock::resources
int resources()
ObjectIPC
Definition:
pep_ipc.H:14
LockBlock
Definition:
pep_ipc.H:54
LockBlock::~LockBlock
virtual ~LockBlock()
ObjectIPC::attach_cnt
virtual int attach_cnt()
Definition:
pep_ipc.H:40
ObjectIPC::new_key
void new_key()
Definition:
pep_ipc.H:23
ObjectIPC::key
virtual key_t key()
Definition:
pep_ipc.H:35
LockBlock::force_destroy
void force_destroy()
Definition:
pep_ipc.H:84
LockBlock::lock
void lock(int id)
LockBlock::LockBlock
LockBlock(int elem_cnt, key_t k_sem)
LockBlock::attach_cnt
virtual int attach_cnt()
LockBlock::unlock
void unlock(int id)
Generated by
1.8.5