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.
31 #ifndef _LINUX_IPC64_H_
32 #define _LINUX_IPC64_H_
35 * The generic ipc64_perm structure.
36 * Note extra padding because this structure is passed back and forth
37 * between kernel and user space.
39 * Pad space is left for:
40 * - 32-bit mode_t on architectures that only had 16 bit
42 * - 2 miscellaneous 32-bit values
52 /* pad if mode_t is ushort: */
53 unsigned char __pad1[sizeof(l_int) - sizeof(l_mode_t)];
61 * The generic msqid64_ds structure fro x86 architecture.
62 * Note extra padding because this structure is passed back and forth
63 * between kernel and user space.
65 * Pad space is left for:
66 * - 64-bit time_t to solve y2038 problem
67 * - 2 miscellaneous 32-bit values
71 struct l_ipc64_perm msg_perm;
72 l_time_t msg_stime; /* last msgsnd time */
73 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
76 l_time_t msg_rtime; /* last msgrcv time */
77 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
80 l_time_t msg_ctime; /* last change time */
81 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
84 l_ulong msg_cbytes; /* current number of bytes on queue */
85 l_ulong msg_qnum; /* number of messages in queue */
86 l_ulong msg_qbytes; /* max number of bytes on queue */
87 l_pid_t msg_lspid; /* pid of last msgsnd */
88 l_pid_t msg_lrpid; /* last receive pid */
94 * The generic semid64_ds structure for x86 architecture.
95 * Note extra padding because this structure is passed back and forth
96 * between kernel and user space.
98 * Pad space is left for:
99 * - 64-bit time_t to solve y2038 problem
100 * - 2 miscellaneous 32-bit values
103 struct l_semid64_ds {
104 struct l_ipc64_perm sem_perm; /* permissions */
105 l_time_t sem_otime; /* last semop time */
107 l_time_t sem_ctime; /* last change time */
109 l_ulong sem_nsems; /* no. of semaphores in array */
115 * The generic shmid64_ds structure for x86 architecture.
116 * Note extra padding because this structure is passed back and forth
117 * between kernel and user space.
119 * Pad space is left for:
120 * - 64-bit time_t to solve y2038 problem
121 * - 2 miscellaneous 32-bit values
124 struct l_shmid64_ds {
125 struct l_ipc64_perm shm_perm; /* operation perms */
126 l_size_t shm_segsz; /* size of segment (bytes) */
127 l_time_t shm_atime; /* last attach time */
128 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
131 l_time_t shm_dtime; /* last detach time */
132 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
135 l_time_t shm_ctime; /* last change time */
136 #if !defined(__LP64__) || defined(COMPAT_LINUX32)
139 l_pid_t shm_cpid; /* pid of creator */
140 l_pid_t shm_lpid; /* pid of last operator */
141 l_ulong shm_nattch; /* no. of current attaches */
158 #endif /* !LINUX_IPC64_H_ */