1<sys/shm.h>(0P) POSIX Programmer's Manual <sys/shm.h>(0P)
2
3
4
6 sys/shm.h - XSI shared memory facility
7
9 #include <sys/shm.h>
10
12 The <sys/shm.h> header shall define the following symbolic constants:
13
14 SHM_RDONLY
15 Attach read-only (else read-write).
16
17 SHM_RND
18 Round attach address to SHMLBA.
19
20
21 The <sys/shm.h> header shall define the following symbolic value:
22
23 SHMLBA Segment low boundary address multiple.
24
25
26 The following data types shall be defined through typedef:
27
28 shmatt_t
29 Unsigned integer used for the number of current attaches that
30 must be able to store values at least as large as a type
31 unsigned short.
32
33
34 The shmid_ds structure shall contain the following members:
35
36
37 struct ipc_perm shm_perm Operation permission structure.
38 size_t shm_segsz Size of segment in bytes.
39 pid_t shm_lpid Process ID of last shared memory operation.
40 pid_t shm_cpid Process ID of creator.
41 shmatt_t shm_nattch Number of current attaches.
42 time_t shm_atime Time of last shmat
43 ().
44 time_t shm_dtime Time of last shmdt
45 ().
46 time_t shm_ctime Time of last change by shmctl
47 ().
48
49 The pid_t, time_t, key_t, and size_t types shall be defined as
50 described in <sys/types.h> .
51
52 The following shall be declared as functions and may also be defined as
53 macros. Function prototypes shall be provided.
54
55
56 void *shmat(int, const void *, int);
57 int shmctl(int, int, struct shmid_ds *);
58 int shmdt(const void *);
59 int shmget(key_t, size_t, int);
60
61 In addition, all of the symbols from <sys/ipc.h> shall be defined when
62 this header is included.
63
64 The following sections are informative.
65
67 None.
68
70 None.
71
73 None.
74
76 <sys/ipc.h>, <sys/types.h>, the System Interfaces volume of
77 IEEE Std 1003.1-2001, shmat(), shmctl(), shmdt(), shmget()
78
80 Portions of this text are reprinted and reproduced in electronic form
81 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
82 -- Portable Operating System Interface (POSIX), The Open Group Base
83 Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of
84 Electrical and Electronics Engineers, Inc and The Open Group. In the
85 event of any discrepancy between this version and the original IEEE and
86 The Open Group Standard, the original IEEE and The Open Group Standard
87 is the referee document. The original Standard can be obtained online
88 at http://www.opengroup.org/unix/online.html .
89
90
91
92IEEE/The Open Group 2003 <sys/shm.h>(0P)