linux_ipc.h (7dabf89bcf0667b4392cbc40528caeba82b21ddd) linux_ipc.h (f730d606d5f9316f4091e793936694ca78a36fc4)
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2000 Marcel Moolenaar
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 70 unchanged lines hidden (view full) ---

79 */
80#define LINUX_IPC_OLD 0 /* Old version (no 32-bit UID support on many
81 architectures) */
82#define LINUX_IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger
83 message sizes, etc. */
84
85#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
86
1/*-
2 * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
3 *
4 * Copyright (c) 2000 Marcel Moolenaar
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 70 unchanged lines hidden (view full) ---

79 */
80#define LINUX_IPC_OLD 0 /* Old version (no 32-bit UID support on many
81 architectures) */
82#define LINUX_IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger
83 message sizes, etc. */
84
85#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))
86
87struct linux_msgctl_args
88{
89 l_int msqid;
90 l_int cmd;
91 struct l_msqid_ds *buf;
92};
93
94struct linux_msgget_args
95{
96 l_key_t key;
97 l_int msgflg;
98};
99
100struct linux_msgrcv_args
101{
102 l_int msqid;
103 struct l_msgbuf *msgp;
104 l_size_t msgsz;
105 l_long msgtyp;
106 l_int msgflg;
107};
108
109struct linux_msgsnd_args
110{
111 l_int msqid;
112 struct l_msgbuf *msgp;
113 l_size_t msgsz;
114 l_int msgflg;
115};
116
117struct linux_semctl_args
118{
119 l_int semid;
120 l_int semnum;
121 l_int cmd;
122 union l_semun arg;
123};
124
125struct linux_semget_args
126{
127 l_key_t key;
128 l_int nsems;
129 l_int semflg;
130};
131
132struct linux_semop_args
133{
134 l_int semid;
135 struct l_sembuf *tsops;
136 l_uint nsops;
137};
138
87struct linux_semop_args
88{
89 l_int semid;
90 struct l_sembuf *tsops;
91 l_uint nsops;
92};
93
139struct linux_shmat_args
140{
141 l_int shmid;
142 char *shmaddr;
143 l_int shmflg;
144};
145
146struct linux_shmctl_args
147{
148 l_int shmid;
149 l_int cmd;
150 struct l_shmid_ds *buf;
151};
152
153struct linux_shmdt_args
154{
155 char *shmaddr;
156};
157
158struct linux_shmget_args
159{
160 l_key_t key;
161 l_size_t size;
162 l_int shmflg;
163};
164
165int linux_msgctl(struct thread *, struct linux_msgctl_args *);
166int linux_msgget(struct thread *, struct linux_msgget_args *);
167int linux_msgrcv(struct thread *, struct linux_msgrcv_args *);
168int linux_msgsnd(struct thread *, struct linux_msgsnd_args *);
169
170int linux_semctl(struct thread *, struct linux_semctl_args *);
171int linux_semget(struct thread *, struct linux_semget_args *);
172int linux_semop(struct thread *, struct linux_semop_args *);
94int linux_semop(struct thread *, struct linux_semop_args *);
173
174int linux_shmat(struct thread *, struct linux_shmat_args *);
175int linux_shmctl(struct thread *, struct linux_shmctl_args *);
176int linux_shmdt(struct thread *, struct linux_shmdt_args *);
177int linux_shmget(struct thread *, struct linux_shmget_args *);
178
179#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
180
181#endif /* _LINUX_IPC_H_ */
95#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */
96
97#endif /* _LINUX_IPC_H_ */