SYS_SHM.H(7) Miscellaneous Information Manual SYS_SHM.H(7)

sys/shm.hXSI shared memory facility


#include <sys/shm.h>

The <sys/shm.h> header shall define the following symbolic constants:

Attach read-only (else read-write).
Round attach address to SHMLBA.
Segment low boundary address multiple.

The <sys/shm.h> header shall define the following data types through :

Unsigned integer used for the number of current attaches that must be able to store values at least as large as a type unsigned short .

The <sys/shm.h> header shall define the structure, which shall include the following members:

struct ipc_perm shm_perm   Operation permission structure.
size_t          shm_segsz  Size of segment in bytes.
pid_t           shm_lpid   Process ID of last shared memory operation.
pid_t           shm_cpid   Process ID of creator.
shmatt_t        shm_nattch Number of current attaches.
time_t          shm_atime  Time of last shmat
 ().
time_t          shm_dtime  Time of last shmdt
 ().
time_t          shm_ctime  Time of last change by shmctl
 ().

The <sys/shm.h> header shall define the , size_t, and types as described in <sys/types.h>.

The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided.

void *shmat(int, const void *, int);
int   shmctl(int, int, struct shmid_ds *);
int   shmdt(const void *);
int   shmget(key_t, size_t, int);

In addition, the <sys/shm.h> header shall include the <sys/ipc.h> header.

None.

None.

None.

<sys/ipc.h> , <sys/types.h>

XSH shmat(3) , shmctl(3) , shmdt(3) , shmget(3)

First released in Issue 2. Derived from System V Release 2.0.

The type of is changed from to size_t.

Austin Group Interpretation 1003.1-2001 #179 is applied.

This reference page is clarified with respect to macros and symbolic constants.

January 1, 2008 posix.fail