1 /* $NetBSD: svr4_ipc.h,v 1.4 2005/12/11 12:20:26 christos Exp $ */
4 * Copyright (c) 1995 The NetBSD Foundation, Inc.
7 * This code is derived from software contributed to The NetBSD Foundation
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions
13 * 1. Redistributions of source code must retain the above copyright
14 * notice, this list of conditions and the following disclaimer.
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in the
17 * documentation and/or other materials provided with the distribution.
19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29 * POSSIBILITY OF SUCH DAMAGE.
38 #define SVR4_IPC_RMID 10
39 #define SVR4_IPC_SET 11
40 #define SVR4_IPC_STAT 12
42 struct svr4_ipc_perm
{
62 struct svr4_msg
*msg_next
;
68 struct svr4_msqid_ds
{
69 struct svr4_ipc_perm msg_perm
;
70 struct svr4_msg
*msg_first
;
71 struct svr4_msg
*msg_last
;
77 svr4_time_t msg_stime
;
79 svr4_time_t msg_rtime
;
81 svr4_time_t msg_ctime
;
89 long mtype
; /* message type */
90 char mtext
[1]; /* message text */
107 #define SVR4_shmctl 1
109 #define SVR4_shmget 3
111 /* shmctl() operations */
112 #define SVR4_SHM_LOCK 3
113 #define SVR4_SHM_UNLOCK 4
115 struct svr4_shmid_ds
{
116 struct svr4_ipc_perm shm_perm
;
124 svr4_time_t shm_atime
;
126 svr4_time_t shm_dtime
;
128 svr4_time_t shm_ctime
;
136 #define SVR4_semctl 0
137 #define SVR4_semget 1
140 /* semctl() operations */
141 #define SVR4_SEM_GETNCNT 3
142 #define SVR4_SEM_GETPID 4
143 #define SVR4_SEM_GETVAL 5
144 #define SVR4_SEM_GETALL 6
145 #define SVR4_SEM_GETZCNT 7
146 #define SVR4_SEM_SETVAL 8
147 #define SVR4_SEM_SETALL 9
158 struct svr4_semid_ds
{
159 struct svr4_ipc_perm sem_perm
;
160 struct svr4_sem
*sem_base
;
162 svr4_time_t sem_otime
;
164 svr4_time_t sem_ctime
;
175 #endif /* _SVR4_IPC_H */