2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
11 #include <UKERNEL/sysincludes.h>
14 #ifndef __AFS_SYSINCLUDESH__
15 #define __AFS_SYSINCLUDESH__ 1
18 #include <sys/errno.h>
19 #include <sys/types.h>
20 #include <sys/param.h>
22 #include <sys/queue.h>
23 #include <sys/resourcevar.h>
24 #include <sys/kernel.h>
27 #include <sys/filedesc.h>
29 #include <sys/socket.h>
30 #include <sys/socketvar.h>
31 #include <sys/dirent.h>
36 #include <sys/mount.h>
37 #include <sys/vnode.h>
38 #include <sys/malloc.h>
39 #include <ufs/ffs/fs.h>
40 #include <ufs/ufs/quota.h>
41 #include <ufs/ufs/inode.h>
42 #include <ufs/ufs/extattr.h>
43 #include <ufs/ufs/ufsmount.h>
48 #include <sys/protosw.h>
49 #include <sys/ioctl.h>
50 #include <sys/timeout.h>
51 #else /* AFS_OBSD_ENV */
52 #ifdef AFS_LINUX22_ENV
53 #include <linux/version.h>
54 #include <linux/config.h>
55 #include <linux/linkage.h>
56 #include <linux/limits.h>
57 #include <linux/wait.h>
58 #include <linux/types.h>
59 #include <linux/vfs.h>
60 #include <linux/net.h>
61 #include <linux/kdev_t.h>
62 #include <linux/ioctl.h>
63 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
64 * inclusion of uaccess.h.
66 #define _LINUX_CODA_FS_I
68 struct coda_inode_info {};
69 #define _LINUX_XFS_FS_I
70 struct xfs_inode_info {};
71 #include <asm/uaccess.h>
72 #include <linux/list.h>
73 #include <linux/dcache.h>
75 #include <linux/quota.h>
76 #include <linux/sched.h>
78 #include <linux/string.h>
79 #include <asm/semaphore.h>
80 #include <linux/errno.h>
81 #ifdef COMPLETION_H_EXISTS
82 #include <linux/completion.h>
85 #else /* AFS_LINUX22_ENV */
86 #if defined(AFS_DARWIN_ENV)
89 typedef unsigned short etap_event_t;
92 #if !defined(AFS_OSF_ENV)
102 #include "h/region.h"
104 #include "h/sysmacros.h"
105 #include "h/signal.h"
107 #endif /* AFS_AUX_ENV */
114 #include "sys/statfs.h"
119 #include "../h/file.h"
120 #include "../h/fullstat.h"
121 #include "../h/vattr.h"
122 #include "../h/var.h"
123 #include "../h/access.h"
124 #endif /* AFS_AIX_ENV */
126 #if defined(AFS_SGI_ENV)
128 #include "sys/sema.h"
129 #include "sys/cmn_err.h"
131 #include <ksys/behavior.h>
132 #endif /* AFS_SGI64_ENV */
133 #include "fs/efs_inode.h"
134 #ifdef AFS_SGI_EFS_IOPS_ENV
135 #include "sgiefs/efs.h"
137 #include "sys/kmem.h"
138 #include "sys/cred.h"
139 #include "sys/resource.h"
142 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
143 * is on (see afs_osi.h).
144 * In IRIX 6.5 we cannot have DEBUG turned on since certain
145 * system-defined structures have different members with DEBUG on, and
146 * this breaks our ability to interact with the rest of the kernel.
148 * Instead of using ASSERT(), we use our own osi_Assert().
150 #if defined(AFS_SGI65_ENV) && !defined(DEBUG)
152 #include "sys/debug.h"
155 #include "sys/debug.h"
158 #include "sys/statvfs.h"
159 #include "sys/sysmacros.h"
160 #include "sys/fs_subr.h"
161 #include "sys/siginfo.h"
162 #endif /* AFS_SGI_ENV */
164 #if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
165 # include "h/kernel.h"
166 #endif /* !SUN5 && !SGI */
169 #include <sys/cmn_err.h> /* for kernel printf() prototype */
172 #if defined(AFS_SUN56_ENV)
173 #include "h/vfs.h" /* stops SUN56 socketvar.h warnings */
174 #include "h/stropts.h" /* stops SUN56 socketvar.h warnings */
175 #include "h/stream.h" /* stops SUN56 socketvar.h errors */
178 #include "h/socket.h"
179 #include "h/socketvar.h"
180 #include "h/protosw.h"
182 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || defined(AFS_FBSD_ENV)
183 # include "h/dirent.h"
185 # include "h/sysmacros.h"
186 # include "h/fs/ufs_fsdir.h"
187 # endif /* AFS_SUN5_ENV */
190 #endif /* SGI || SUN || HPUX */
193 # include "h/smp_lock.h"
194 #endif /* AFS_DEC_ENV */
197 #if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV)
199 #endif /* AFS_SGI64_ENV */
200 #define MACH_USER_API 1
201 #if defined(AFS_FBSD50_ENV)
210 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
212 # include "h/mount.h"
213 # include "machine/psl.h"
214 # include "afs/gfs_vnode.h"
218 # include <vfs/vfs.h>
219 # include <vfs/vnode.h>
220 # include <sys/inode.h>
221 # include <sys/mount.h>
222 # include <vm/vm_pager.h>
223 # include <kern/mfs.h>
224 # include <mach/vm_param.h>
225 # include <kern/parallel.h>
226 #endif /* AFS_MACH_ENV */
230 # include "h/statvfs.h"
231 # endif /* AFS_SUN5_ENV */
233 struct vfspage; /* for vnode.h compiler warnings */
234 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
235 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
236 #ifdef AFS_HPUX110_ENV
237 # include "h/resource.h"
239 # endif /* AFS_HPUX_ENV */
240 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
241 # include <sys/uio.h>
242 # include <sys/mount.h>
243 # include <sys/namei.h>
244 # include <sys/vnode.h>
245 # include <sys/queue.h>
246 # include <sys/malloc.h>
248 # include <sys/ubc.h>
249 #define timeout_fcn_t mach_timeout_fcn_t
250 # include <kern/sched_prim.h>
252 MALLOC_DECLARE(M_AFS);
253 # include <ufs/ufs/dinode.h>
255 # include <vm/vm_extern.h>
256 # include <vm/pmap.h>
257 # include <vm/vm_map.h>
258 # include <sys/lock.h>
259 # include <sys/user.h>
263 #define doff_t int32_t
264 # include <ufs/ufs/quota.h>
265 # include <ufs/ufs/inode.h>
266 # include <ufs/ffs/fs.h>
269 # include "h/vnode.h"
271 # include "h/fs/ufs_inode.h"
272 # include "h/fs/ufs_mount.h"
274 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV)
275 # include "ufs/inode.h"
276 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV)
277 # include "ufs/mount.h"
278 # endif /* !AFS_HPUX_ENV */
279 # endif /* !AFS_AIX32_ENV */
280 # endif /* AFS_SUN5_ENV */
281 #endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
282 #endif /* AFS_DEC_ENV */
284 /* These mainly deal with networking and rpc headers */
285 #include "netinet/in.h"
286 #undef MFREE /* defined at mount.h for AIX */
290 #if !defined(AFS_HPUX_ENV)
293 #endif /* AFS_SUN5_ENV */
295 #include "rpc/types.h"
299 # include "net/spl.h"
302 /* Miscellaneous headers */
304 #if !defined(AFS_FBSD_ENV)
306 #endif /* AFS_FBSD_ENV */
308 #if defined(AFS_HPUX101_ENV)
309 #include "h/proc_iface.h"
313 #if defined(AFS_HPUX102_ENV)
314 #include "h/unistd.h"
318 #if !defined(AFS_SGI_ENV) && !defined(AFS_SUN_ENV) && !defined(AFS_MACH_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV)
324 #if defined(AFS_AIX_ENV) || defined(AFS_DEC_ENV)
325 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
327 # include "h/fcntl.h"
328 #endif /* AIX || DEC */
330 #if defined(AFS_SGI_ENV) || defined(AFS_SUN_ENV) || defined(AFS_SUN5_ENV)
331 # include "h/unistd.h"
332 #endif /* SGI || SUN */
335 # include "h/vmuser.h"
336 #endif /* AFS_AIX32_ENV */
338 #if defined(AFS_SUN5_ENV)
339 #include <sys/tiuser.h>
340 #include <sys/t_lock.h>
341 #include <sys/mutex.h>
342 #include <sys/vtrace.h>
343 #include <sys/pathname.h>
344 #include <sys/debug.h>
347 #else /* ! AFS_OSF_ENV */
348 /* All of the OSF/1 stuff is here */
349 #include <net/net_globals.h>
351 #include <sys/types.h>
352 #include <sys/param.h>
353 #include <sys/systm.h>
354 #include <sys/time.h>
355 #include <sys/kernel.h>
356 #include <sys/socket.h>
357 #include <sys/socketvar.h>
358 #include <sys/protosw.h>
360 #include <sys/user.h>
361 #include <sys/file.h>
364 #include <sys/stat.h>
365 #include <sys/vnode.h>
366 #include <ufs/inode.h>
367 #include <sys/mount.h>
368 #include <vm/vm_page.h>
369 #include <mach/vm_param.h>
370 #include <kern/parallel.h>
371 #include <mach/mach_types.h>
372 #ifndef AFS_OSF30_ENV
373 #include <kern/mfs.h>
375 #include <mach/vm_param.h>
376 #include <kern/parallel.h>
378 /* These mainly deal with networking and rpc headers */
379 #include <netinet/in.h>
380 #include <sys/mbuf.h>
381 #include <rpc/types.h>
389 #endif /* AFS_ALPHA_ENV */
392 #include <sys/proc.h>
393 #include <sys/ioctl.h>
395 #endif /* AFS_OSF_ENV */
396 #endif /* AFS_LINUX22_ENV */
397 #endif /* AFS_OBSD_ENV */
399 #endif /* __AFS_SYSINCLUDESH__ so idempotent */