2
* Header file which declares stubs for the shared memory interface.
3
* Note that the input arguments switch between integers and pointers
4
* to integers depending on if they are modified on return.
10
* Create a shared region of at least size bytes, returning the actual size,
11
* the id associated with the region. The return vaue is a pointer to the
12
* the region. Any error is a hard fail.
14
extern char *CreateSharedRegion(long *id, long *size);
17
* Detach a process from a shared memory region. 0 is returned on success,
18
* -1 for failure. id, size, and addr much match exactly those items returned
19
* from CreateSharedRegion
22
extern long DetachSharedRegion(long id, long size, char *addr);
25
* Delete a shared region from the system. This has to be done on the SUN
26
* to remove it from the system. On the Alliant the shared region disappears
27
* when the last process dies or detaches. Returns 0 on success, -1 on error.
29
extern long DeleteSharedRegion(long id);
32
* Attach to a shared memory region of known id and size. Returns the
33
* address of the mapped memory. Size must exactly match the size returned
34
* from CreateSharedRegion (which in turn is the requested size rounded
35
* up to a multiple of 4096). Any error is a hard fail.
37
extern char *AttachSharedRegion(long id, long size);