aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/linux32/linux32_ipc64.h
blob: f8c92c4803ec06ea0880c48acdb28280e80f8035 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
/*-
 * Copyright (c) 2002 Maxim Sobolev <sobomax@FreeBSD.org>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer 
 *    in this position and unchanged.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. The name of the author may not be used to endorse or promote products
 *    derived from this software without specific prior written permission
 *
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 * $FreeBSD$
 */

#ifndef _AMD64_LINUX_LINUX_IPC64_H_
#define	_AMD64_LINUX_LINUX_IPC64_H_

/*
 * The ipc64_perm structure for i386 architecture.
 * Note extra padding because this structure is passed back and forth
 * between kernel and user space.
 *
 * Pad space is left for:
 * - 32-bit mode_t and seq
 * - 2 miscellaneous 32-bit values
 */

struct l_ipc64_perm
{
	l_key_t		key;
	l_uid_t		uid;
	l_gid_t		gid;
	l_uid_t		cuid;
	l_gid_t		cgid;
	l_mode_t	mode;
	l_ushort	__pad1;
	l_ushort	seq;
	l_ushort	__pad2;
	l_ulong		__unused1;
	l_ulong		__unused2;
} __packed;

/*
 * The msqid64_ds structure for i386 architecture.
 * Note extra padding because this structure is passed back and forth
 * between kernel and user space.
 *
 * Pad space is left for:
 * - 64-bit time_t to solve y2038 problem
 * - 2 miscellaneous 32-bit values
 */

struct l_msqid64_ds {
	struct l_ipc64_perm msg_perm;
	l_time_t	msg_stime;	/* last msgsnd time */
	l_ulong		__unused1;
	l_time_t	msg_rtime;	/* last msgrcv time */
	l_ulong		__unused2;
	l_time_t	msg_ctime;	/* last change time */
	l_ulong		__unused3;
	l_ulong		msg_cbytes;	/* current number of bytes on queue */
	l_ulong		msg_qnum;	/* number of messages in queue */
	l_ulong		msg_qbytes;	/* max number of bytes on queue */
	l_pid_t		msg_lspid;	/* pid of last msgsnd */
	l_pid_t		msg_lrpid;	/* last receive pid */
	l_ulong		__unused4;
	l_ulong		__unused5;
} __packed;

/*
 * The semid64_ds structure for i386 architecture.
 * Note extra padding because this structure is passed back and forth
 * between kernel and user space.
 *
 * Pad space is left for:
 * - 64-bit time_t to solve y2038 problem
 * - 2 miscellaneous 32-bit values
 */

struct l_semid64_ds {
	struct l_ipc64_perm sem_perm;	/* permissions */
	l_time_t	sem_otime;	/* last semop time */
	l_ulong		__unused1;
	l_time_t	sem_ctime;	/* last change time */
	l_ulong		__unused2;
	l_ulong		sem_nsems;	/* no. of semaphores in array */
	l_ulong		__unused3;
	l_ulong		__unused4;
} __packed;

/*
 * The shmid64_ds structure for i386 architecture.
 * Note extra padding because this structure is passed back and forth
 * between kernel and user space.
 *
 * Pad space is left for:
 * - 64-bit time_t to solve y2038 problem
 * - 2 miscellaneous 32-bit values
 */

struct l_shmid64_ds {
	struct l_ipc64_perm shm_perm;	/* operation perms */
	l_size_t	shm_segsz;	/* size of segment (bytes) */
	l_time_t	shm_atime;	/* last attach time */
	l_ulong		__unused1;
	l_time_t	shm_dtime;	/* last detach time */
	l_ulong		__unused2;
	l_time_t	shm_ctime;	/* last change time */
	l_ulong		__unused3;
	l_pid_t		shm_cpid;	/* pid of creator */
	l_pid_t		shm_lpid;	/* pid of last operator */
	l_ulong		shm_nattch;	/* no. of current attaches */
	l_ulong		__unused4;
	l_ulong		__unused5;
} __packed;

struct l_shminfo64 {
	l_ulong   	shmmax;
	l_ulong   	shmmin;
	l_ulong   	shmmni;
	l_ulong   	shmseg;
	l_ulong   	shmall;
	l_ulong   	__unused1;
	l_ulong   	__unused2;
	l_ulong   	__unused3;
	l_ulong   	__unused4;
} __packed;

#endif /* !_AMD64_LINUX_LINUX_IPC64_H_ */