proc->thread stage 4: rework the VFS and DEVICE subsystems to take thread
[dragonfly.git] / sys / emulation / linux / linux_ipc.h
1 /*-
2  * Copyright (c) 2000 Marcel Moolenaar
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
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.
16  *
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.
27  *
28  * $FreeBSD: src/sys/compat/linux/linux_ipc.h,v 1.2.2.4 2001/11/05 19:08:22 marcel Exp $
29  * $DragonFly: src/sys/emulation/linux/linux_ipc.h,v 1.3 2003/06/23 17:55:26 dillon Exp $
30  */
31
32 #ifndef _LINUX_IPC_H_
33 #define _LINUX_IPC_H_
34
35 #ifdef __i386__
36
37 struct linux_msgctl_args 
38 {
39         l_int           msqid;
40         l_int           cmd;
41         struct l_msqid_ds *buf;
42 };
43
44 struct linux_msgget_args
45 {
46         l_key_t         key;
47         l_int           msgflg;
48 };
49
50 struct linux_msgrcv_args
51 {
52         l_int           msqid;
53         struct l_msgbuf *msgp;
54         l_size_t        msgsz;
55         l_long          msgtyp;
56         l_int           msgflg;
57 };
58
59 struct linux_msgsnd_args
60 {
61         l_int           msqid;
62         struct l_msgbuf *msgp;
63         l_size_t        msgsz;
64         l_int           msgflg;
65 };
66
67 struct linux_semctl_args
68 {
69         l_int           semid;
70         l_int           semnum;
71         l_int           cmd;
72         union l_semun   arg;
73 };
74
75 struct linux_semget_args
76 {
77         l_key_t         key;
78         l_int           nsems;
79         l_int           semflg;
80 };
81
82 struct linux_semop_args
83 {
84         l_int           semid;
85         struct l_sembuf *tsops;
86         l_uint          nsops;
87 };
88
89 struct linux_shmat_args
90 {
91         l_int           shmid;
92         char            *shmaddr;
93         l_int           shmflg;
94         l_ulong         *raddr;
95 };
96
97 struct linux_shmctl_args
98 {
99         l_int           shmid;
100         l_int           cmd;
101         struct l_shmid_ds *buf;
102 };
103
104 struct linux_shmdt_args
105 {
106         char *shmaddr;
107 };
108
109 struct linux_shmget_args
110 {
111         l_key_t         key;
112         l_size_t        size;
113         l_int           shmflg;
114 };
115
116 int linux_msgctl __P((struct linux_msgctl_args *));
117 int linux_msgget __P((struct linux_msgget_args *));
118 int linux_msgrcv __P((struct linux_msgrcv_args *));
119 int linux_msgsnd __P((struct linux_msgsnd_args *));
120
121 int linux_semctl __P((struct linux_semctl_args *));
122 int linux_semget __P((struct linux_semget_args *));
123 int linux_semop  __P((struct linux_semop_args *));
124
125 int linux_shmat  __P((struct linux_shmat_args *));
126 int linux_shmctl __P((struct linux_shmctl_args *));
127 int linux_shmdt  __P((struct linux_shmdt_args *));
128 int linux_shmget __P((struct linux_shmget_args *));
129
130 #endif  /* __i386__ */
131
132 #endif /* _LINUX_IPC_H_ */