pshm is a simple encapsulation of the system V shared memory IPC
protected data members for access from derived class
pshm is a simple encapsulation of the system V shared memory IPC.USAGE:
pshm::pshm( int size, key_t, char *file ); pshm::pshm( int *pId ) : this constructor is used in order to attach to an existing shm. NOTE: we use int and int* in to distinguish the two constructorsMODIFICATIONS:
- Add member function addToCleanupScript which builds up a cleanup script that can be executed to delete the IPC resources if one chooses to.
pshm(int *pId )
The identifier is passed as a pointer in order to distinguish from the other constructor.
Note the difference between the normal constructor and this one: in the normal case we
know only the key and the project file name. The parent class pipc will use this information
to create a unique key, which is then used to get the unique identifier for the
shared memory segment.
If one know already the shared memory identifier, then one can directly attach to it - thus
use this constructor.
static int remove(int id)
static int exists(int size, key_t my_key, char *filename = NULL )
void* get_addr()
int set_uid( uid_t new_uid )
void addToCleanupScript( int theId )
void* addr
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de