2 * Copyright (c) 2002 Maxim Sobolev <sobomax@FreeBSD.org>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer
10 * in this position and unchanged.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * 3. The name of the author may not be used to endorse or promote products
15 * derived from this software without specific prior written permission
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 #ifndef _LINUX_IPC64_H_
30 #define _LINUX_IPC64_H_
33 * The generic ipc64_perm structure.
34 * Note extra padding because this structure is passed back and forth
35 * between kernel and user space.
37 * Pad space is left for:
38 * - 32-bit mode_t on architectures that only had 16 bit
40 * - 2 miscellaneous 32-bit values
50 /* pad if mode_t is ushort: */
51 unsigned char __pad1[sizeof(l_int) - sizeof(l_mode_t)];
59 * The generic msqid64_ds structure fro x86 architecture.
60 * Note extra padding because this structure is passed back and forth
61 * between kernel and user space.
63 * Pad space is left for:
64 * - 64-bit time_t to solve y2038 problem
65 * - 2 miscellaneous 32-bit values
69 struct l_ipc64_perm msg_perm;
70 l_time_t msg_stime; /* last msgsnd time */
71 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
74 l_time_t msg_rtime; /* last msgrcv time */
75 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
78 l_time_t msg_ctime; /* last change time */
79 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
82 l_ulong msg_cbytes; /* current number of bytes on queue */
83 l_ulong msg_qnum; /* number of messages in queue */
84 l_ulong msg_qbytes; /* max number of bytes on queue */
85 l_pid_t msg_lspid; /* pid of last msgsnd */
86 l_pid_t msg_lrpid; /* last receive pid */
92 * The generic semid64_ds structure for x86 architecture.
93 * Note extra padding because this structure is passed back and forth
94 * between kernel and user space.
96 * Pad space is left for:
97 * - 64-bit time_t to solve y2038 problem
98 * - 2 miscellaneous 32-bit values
101 struct l_semid64_ds {
102 struct l_ipc64_perm sem_perm; /* permissions */
103 l_time_t sem_otime; /* last semop time */
105 l_time_t sem_ctime; /* last change time */
107 l_ulong sem_nsems; /* no. of semaphores in array */
113 * The generic shmid64_ds structure for x86 architecture.
114 * Note extra padding because this structure is passed back and forth
115 * between kernel and user space.
117 * Pad space is left for:
118 * - 64-bit time_t to solve y2038 problem
119 * - 2 miscellaneous 32-bit values
122 struct l_shmid64_ds {
123 struct l_ipc64_perm shm_perm; /* operation perms */
124 l_size_t shm_segsz; /* size of segment (bytes) */
125 l_time_t shm_atime; /* last attach time */
126 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
129 l_time_t shm_dtime; /* last detach time */
130 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
133 l_time_t shm_ctime; /* last change time */
134 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
137 l_pid_t shm_cpid; /* pid of creator */
138 l_pid_t shm_lpid; /* pid of last operator */
139 l_ulong shm_nattch; /* no. of current attaches */
156 #endif /* !LINUX_IPC64_H_ */