2002-05-24 04:29:10 +00:00
|
|
|
// platform-independent interface to shared memory
|
|
|
|
|
|
|
|
#include <sys/shm.h>
|
|
|
|
|
|
|
|
// create a shared-memory segment of the given size.
|
|
|
|
//
|
|
|
|
extern int create_shmem(key_t, int size, void**);
|
|
|
|
|
|
|
|
// Destroy a shared-memory segment.
|
|
|
|
// If there are attachments to it,
|
|
|
|
// print a message in a loop until the attachments are gone
|
|
|
|
//
|
|
|
|
extern int destroy_shmem(key_t);
|
|
|
|
|
|
|
|
// attach to a shared-memory segment
|
|
|
|
//
|
|
|
|
extern int attach_shmem(key_t, void**);
|
|
|
|
|
|
|
|
// detach from a shared-mem segment
|
|
|
|
//
|
2002-06-01 20:26:21 +00:00
|
|
|
extern int detach_shmem(void*);
|