/*-1* Copyright (c) 2002 Maxim Sobolev <[email protected]>2* All rights reserved.3*4* Redistribution and use in source and binary forms, with or without5* modification, are permitted provided that the following conditions6* are met:7* 1. Redistributions of source code must retain the above copyright8* notice, this list of conditions and the following disclaimer9* in this position and unchanged.10* 2. Redistributions in binary form must reproduce the above copyright11* notice, this list of conditions and the following disclaimer in the12* documentation and/or other materials provided with the distribution.13* 3. The name of the author may not be used to endorse or promote products14* derived from this software without specific prior written permission15*16* THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR17* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES18* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.19* IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,20* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT21* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,22* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY23* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT24* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF25* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.26*/2728#ifndef _LINUX_IPC64_H_29#define _LINUX_IPC64_H_3031/*32* The generic ipc64_perm structure.33* Note extra padding because this structure is passed back and forth34* between kernel and user space.35*36* Pad space is left for:37* - 32-bit mode_t on architectures that only had 16 bit38* - 32-bit seq39* - 2 miscellaneous 32-bit values40*/41struct l_ipc64_perm42{43l_key_t key;44l_uid_t uid;45l_gid_t gid;46l_uid_t cuid;47l_gid_t cgid;48l_mode_t mode;49/* pad if mode_t is ushort: */50unsigned char __pad1[sizeof(l_int) - sizeof(l_mode_t)];51l_ushort seq;52l_ushort __pad2;53l_ulong __unused1;54l_ulong __unused2;55};5657/*58* The generic msqid64_ds structure fro x86 architecture.59* Note extra padding because this structure is passed back and forth60* between kernel and user space.61*62* Pad space is left for:63* - 64-bit time_t to solve y2038 problem64* - 2 miscellaneous 32-bit values65*/6667struct l_msqid64_ds {68struct l_ipc64_perm msg_perm;69l_time_t msg_stime; /* last msgsnd time */70#if !defined(__LP64__) || defined(COMPAT_LINUX32)71l_ulong __unused1;72#endif73l_time_t msg_rtime; /* last msgrcv time */74#if !defined(__LP64__) || defined(COMPAT_LINUX32)75l_ulong __unused2;76#endif77l_time_t msg_ctime; /* last change time */78#if !defined(__LP64__) || defined(COMPAT_LINUX32)79l_ulong __unused3;80#endif81l_ulong msg_cbytes; /* current number of bytes on queue */82l_ulong msg_qnum; /* number of messages in queue */83l_ulong msg_qbytes; /* max number of bytes on queue */84l_pid_t msg_lspid; /* pid of last msgsnd */85l_pid_t msg_lrpid; /* last receive pid */86l_ulong __unused4;87l_ulong __unused5;88};8990/*91* The generic semid64_ds structure for x86 architecture.92* Note extra padding because this structure is passed back and forth93* between kernel and user space.94*95* Pad space is left for:96* - 64-bit time_t to solve y2038 problem97* - 2 miscellaneous 32-bit values98*/99100struct l_semid64_ds {101struct l_ipc64_perm sem_perm; /* permissions */102l_time_t sem_otime; /* last semop time */103#if defined(__amd64__) || defined(__i386__)104l_ulong __unused1;105#endif106l_time_t sem_ctime; /* last change time */107#if defined(__amd64__) || defined(__i386__)108l_ulong __unused2;109#endif110l_ulong sem_nsems; /* no. of semaphores in array */111l_ulong __unused3;112l_ulong __unused4;113};114115/*116* The generic shmid64_ds structure for x86 architecture.117* Note extra padding because this structure is passed back and forth118* between kernel and user space.119*120* Pad space is left for:121* - 64-bit time_t to solve y2038 problem122* - 2 miscellaneous 32-bit values123*/124125struct l_shmid64_ds {126struct l_ipc64_perm shm_perm; /* operation perms */127l_size_t shm_segsz; /* size of segment (bytes) */128l_time_t shm_atime; /* last attach time */129#if !defined(__LP64__) || defined(COMPAT_LINUX32)130l_ulong __unused1;131#endif132l_time_t shm_dtime; /* last detach time */133#if !defined(__LP64__) || defined(COMPAT_LINUX32)134l_ulong __unused2;135#endif136l_time_t shm_ctime; /* last change time */137#if !defined(__LP64__) || defined(COMPAT_LINUX32)138l_ulong __unused3;139#endif140l_pid_t shm_cpid; /* pid of creator */141l_pid_t shm_lpid; /* pid of last operator */142l_ulong shm_nattch; /* no. of current attaches */143l_ulong __unused4;144l_ulong __unused5;145};146147struct l_shminfo64 {148l_ulong shmmax;149l_ulong shmmin;150l_ulong shmmni;151l_ulong shmseg;152l_ulong shmall;153l_ulong __unused1;154l_ulong __unused2;155l_ulong __unused3;156l_ulong __unused4;157};158159#endif /* !LINUX_IPC64_H_ */160161162