3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
28 /* All Rights Reserved */
29
30 /*
31 * Portions of this source code were derived from Berkeley 4.3 BSD
32 * under license from the Regents of the University of California.
33 */
34
35 #ifndef _SYS_SHM_H
36 #define _SYS_SHM_H
37
38 #pragma ident "%Z%%M% %I% %E% SMI"
39
40 #include <sys/ipc.h>
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /*
47 * IPC Shared Memory Facility.
48 */
49
50 /*
51 * Implementation Constants.
52 */
53 #if (defined(_KERNEL) || defined(_KMEMUSER))
54
55 #define SHMLBA PAGESIZE /* segment low boundary address multiple */
56 /* (SHMLBA must be a power of 2) */
57 #else
58 #include <sys/unistd.h> /* needed for _SC_PAGESIZE */
59 extern long _sysconf(int); /* System Private interface to sysconf() */
104 time_t shm_ctime; /* last change time */
105 int64_t shm_pad4[4]; /* reserve area */
106 #else /* _LP64 */
107 time_t shm_atime; /* last shmat time */
108 int32_t shm_pad1; /* reserved for time_t expansion */
109 time_t shm_dtime; /* last shmdt time */
110 int32_t shm_pad2; /* reserved for time_t expansion */
111 time_t shm_ctime; /* last change time */
112 int32_t shm_pad3; /* reserved for time_t expansion */
113 int32_t shm_pad4[4]; /* reserve area */
114 #endif /* _LP64 */
115 };
116
117 /*
118 * Shared memory control operations
119 */
120 #define SHM_LOCK 3 /* Lock segment in core */
121 #define SHM_UNLOCK 4 /* Unlock segment */
122
123 #if !defined(_KERNEL)
124 #if defined(__STDC__)
125 int shmget(key_t, size_t, int);
126 int shmids(int *, uint_t, uint_t *);
127 int shmctl(int, int, struct shmid_ds *);
128 void *shmat(int, const void *, int);
129 #if defined(_XPG4)
130 int shmdt(const void *);
131 #else
132 int shmdt(char *);
133 #endif /* defined(_XPG4) */
134 #else /* __STDC__ */
135 int shmctl();
136 int shmget();
137 int shmids();
138 void *shmat();
139 int shmdt();
140 #endif /* __STDC__ */
141 #endif /* !defined(_KERNEL) */
142
143 #ifdef __cplusplus
144 }
145 #endif
146
147 #endif /* _SYS_SHM_H */
|
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License, Version 1.0 only
6 * (the "License"). You may not use this file except in compliance
7 * with the License.
8 *
9 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10 * or http://www.opensolaris.org/os/licensing.
11 * See the License for the specific language governing permissions
12 * and limitations under the License.
13 *
14 * When distributing Covered Code, include this CDDL HEADER in each
15 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16 * If applicable, add the following below this CDDL HEADER, with the
17 * fields enclosed by brackets "[]" replaced with your own identifying
18 * information: Portions Copyright [yyyy] [name of copyright owner]
19 *
20 * CDDL HEADER END
21 */
22 /*
23 * Copyright 2014 Garrett D'Amore <garrett@damore.org>
24 *
25 * Copyright 2003 Sun Microsystems, Inc. All rights reserved.
26 * Use is subject to license terms.
27 */
28
29 /* Copyright (c) 1983, 1984, 1985, 1986, 1987, 1988, 1989 AT&T */
30 /* All Rights Reserved */
31
32 /*
33 * Portions of this source code were derived from Berkeley 4.3 BSD
34 * under license from the Regents of the University of California.
35 */
36
37 #ifndef _SYS_SHM_H
38 #define _SYS_SHM_H
39
40 #include <sys/ipc.h>
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
45
46 /*
47 * IPC Shared Memory Facility.
48 */
49
50 /*
51 * Implementation Constants.
52 */
53 #if (defined(_KERNEL) || defined(_KMEMUSER))
54
55 #define SHMLBA PAGESIZE /* segment low boundary address multiple */
56 /* (SHMLBA must be a power of 2) */
57 #else
58 #include <sys/unistd.h> /* needed for _SC_PAGESIZE */
59 extern long _sysconf(int); /* System Private interface to sysconf() */
104 time_t shm_ctime; /* last change time */
105 int64_t shm_pad4[4]; /* reserve area */
106 #else /* _LP64 */
107 time_t shm_atime; /* last shmat time */
108 int32_t shm_pad1; /* reserved for time_t expansion */
109 time_t shm_dtime; /* last shmdt time */
110 int32_t shm_pad2; /* reserved for time_t expansion */
111 time_t shm_ctime; /* last change time */
112 int32_t shm_pad3; /* reserved for time_t expansion */
113 int32_t shm_pad4[4]; /* reserve area */
114 #endif /* _LP64 */
115 };
116
117 /*
118 * Shared memory control operations
119 */
120 #define SHM_LOCK 3 /* Lock segment in core */
121 #define SHM_UNLOCK 4 /* Unlock segment */
122
123 #if !defined(_KERNEL)
124 int shmget(key_t, size_t, int);
125 int shmids(int *, uint_t, uint_t *);
126 int shmctl(int, int, struct shmid_ds *);
127 void *shmat(int, const void *, int);
128 #if defined(_XPG4)
129 int shmdt(const void *);
130 #else
131 int shmdt(char *);
132 #endif /* defined(_XPG4) */
133 #endif /* !defined(_KERNEL) */
134
135 #ifdef __cplusplus
136 }
137 #endif
138
139 #endif /* _SYS_SHM_H */
|