/*-1* SPDX-License-Identifier: BSD-2-Clause2*3* Copyright (c) 2000 Marcel Moolenaar4* All rights reserved.5*6* Redistribution and use in source and binary forms, with or without7* modification, are permitted provided that the following conditions8* are met:9* 1. Redistributions of source code must retain the above copyright10* notice, this list of conditions and the following disclaimer.11* 2. Redistributions in binary form must reproduce the above copyright12* notice, this list of conditions and the following disclaimer in the13* documentation and/or other materials provided with the distribution.14*15* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND16* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE17* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE18* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE19* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL20* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS21* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)22* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT23* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY24* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF25* SUCH DAMAGE.26*/2728#ifndef _LINUX_IPC_H_29#define _LINUX_IPC_H_3031/*32* SystemV IPC defines33*/34#define LINUX_SEMOP 135#define LINUX_SEMGET 236#define LINUX_SEMCTL 337#define LINUX_SEMTIMEDOP 438#define LINUX_MSGSND 1139#define LINUX_MSGRCV 1240#define LINUX_MSGGET 1341#define LINUX_MSGCTL 1442#define LINUX_SHMAT 2143#define LINUX_SHMDT 2244#define LINUX_SHMGET 2345#define LINUX_SHMCTL 244647#define LINUX_IPC_RMID 048#define LINUX_IPC_SET 149#define LINUX_IPC_STAT 250#define LINUX_IPC_INFO 35152#define LINUX_MSG_INFO 125354#define LINUX_SHM_LOCK 1155#define LINUX_SHM_UNLOCK 1256#define LINUX_SHM_STAT 1357#define LINUX_SHM_INFO 145859#define LINUX_SHM_RDONLY 0x100060#define LINUX_SHM_RND 0x200061#define LINUX_SHM_REMAP 0x40006263/* semctl commands */64#define LINUX_GETPID 1165#define LINUX_GETVAL 1266#define LINUX_GETALL 1367#define LINUX_GETNCNT 1468#define LINUX_GETZCNT 1569#define LINUX_SETVAL 1670#define LINUX_SETALL 1771#define LINUX_SEM_STAT 1872#define LINUX_SEM_INFO 197374/*75* Version flags for semctl, msgctl, and shmctl commands76* These are passed as bitflags or-ed with the actual command77*/78#define LINUX_IPC_OLD 0 /* Old version (no 32-bit UID support on many79architectures) */80#define LINUX_IPC_64 0x0100 /* New version (support 32-bit UIDs, bigger81message sizes, etc. */8283#if defined(__i386__) || (defined(__amd64__) && defined(COMPAT_LINUX32))84struct linux_semtimedop_args85{86l_int semid;87struct sembuf *tsops;88l_uint nsops;89struct l_timespec *timeout;90};9192int linux_semtimedop(struct thread *, struct linux_semtimedop_args *);93#endif /* __i386__ || (__amd64__ && COMPAT_LINUX32) */9495#endif /* _LINUX_IPC_H_ */969798