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>
21 # include <sys/lock.h>
22 # include <sys/queue.h>
23 # include <sys/resourcevar.h>
24 # include <sys/kernel.h>
25 # include <sys/proc.h>
26 # include <sys/time.h>
27 # include <sys/filedesc.h>
28 # include <sys/file.h>
29 # include <sys/socket.h>
30 # include <sys/socketvar.h>
31 # include <sys/dirent.h>
32 # include <sys/user.h>
35 # include <sys/stat.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 # ifndef AFS_OBSD38_ENV
43 # include <ufs/ufs/extattr.h>
45 # include <ufs/ufs/ufsmount.h>
47 # include <sys/mbuf.h>
50 # include <sys/protosw.h>
51 # include <sys/ioctl.h>
52 # include <sys/timeout.h>
54 #elif defined(AFS_NBSD40_ENV)
55 # if defined(AFS_NBSD50_ENV) && !defined(AFS_NBSD70_ENV)
56 # include <sys/simplelock.h>
58 # include <sys/errno.h>
59 # include <sys/types.h>
60 # include <sys/mount.h> /* may define MOUNT_AFS */
61 # include <sys/param.h>
62 # include <sys/systm.h>
63 # include <sys/conf.h>
64 # include <sys/exec.h>
65 # include <sys/lock.h>
66 # include <sys/syscall.h>
67 # include <sys/syscallargs.h>
68 # include <sys/queue.h>
69 # include <sys/resourcevar.h>
70 # include <sys/kernel.h>
71 # include <sys/proc.h>
72 # include <sys/time.h>
73 # include <sys/filedesc.h>
74 # include <sys/exec.h>
75 # include <sys/lock.h>
76 # include <sys/syscall.h>
77 # include <sys/syscallargs.h>
78 # include <sys/queue.h>
79 # include <sys/resourcevar.h>
80 # include <sys/kernel.h>
81 # include <sys/proc.h>
82 # include <sys/time.h>
83 # include <sys/filedesc.h>
84 # include <sys/file.h>
85 # include <sys/socket.h>
86 # include <sys/socketvar.h>
87 # include <sys/dirent.h>
88 # include <sys/kauth.h>
91 # include <sys/stat.h>
92 # include <sys/file.h>
93 # include <sys/namei.h>
96 # include <sys/file.h>
97 # include <sys/namei.h>
98 # include <sys/vnode.h>
99 # include <ufs/ffs/fs.h>
100 # include <ufs/ufs/quota.h>
101 # include <ufs/ufs/inode.h>
102 # include <ufs/ufs/extattr.h>
103 # include <ufs/ufs/ufsmount.h>
105 # include <sys/mbuf.h>
108 # include <sys/protosw.h>
109 # include <sys/ioctl.h>
111 #elif defined(AFS_LINUX22_ENV)
112 # include <linux/version.h>
113 # ifdef HAVE_LINUX_CONFIG_H
114 # include <linux/config.h>
116 # include <linux/linkage.h>
117 # include <linux/limits.h>
118 # include <linux/wait.h>
119 # include <linux/types.h>
120 # include <linux/vfs.h>
121 # include <linux/net.h>
122 # include <linux/kdev_t.h>
123 # include <linux/ioctl.h>
124 # if defined(AFS_LINUX26_ENV)
125 # include <linux/backing-dev.h>
126 # include <linux/pagemap.h>
127 # include <linux/namei.h>
128 # ifdef STRUCT_INODE_HAS_I_SECURITY
129 # include <linux/security.h>
131 # include <linux/suspend.h>
133 /* Avoid conflicts with coda overloading AFS type namespace. Must precede
134 * inclusion of uaccess.h.
136 # ifndef _LINUX_CODA_FS_I
137 # define _LINUX_CODA_FS_I
138 # define _CODA_HEADER_
139 # define _CFS_HEADER_
140 struct coda_inode_info
{
143 # ifndef _LINUX_XFS_FS_I
144 # define _LINUX_XFS_FS_I
145 struct xfs_inode_info
{
148 # if defined(HAVE_LINUX_UACCESS_H)
149 # include <linux/uaccess.h>
151 # include <asm/uaccess.h>
153 # include <linux/list.h>
154 # include <linux/dcache.h>
155 # include <linux/mount.h>
156 # include <linux/fs.h>
157 # include <linux/quota.h>
158 # include <linux/sched.h>
159 # if defined(HAVE_LINUX_SCHED_SIGNAL_H)
160 # include <linux/sched/signal.h>
162 # include <linux/mm.h>
163 # include <linux/slab.h>
164 # include <linux/proc_fs.h>
165 # include <linux/string.h>
166 # if defined(HAVE_LINUX_SEMAPHORE_H)
167 # include <linux/semaphore.h>
169 # include <asm/semaphore.h>
171 # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
172 # include <linux/mutex.h>
174 # include <linux/errno.h>
175 # include <linux/completion.h>
176 # if defined(HAVE_LINUX_EXPORTFS_H)
177 # include <linux/exportfs.h>
179 # ifdef AFS_LINUX24_ENV
180 # include <linux/pagemap.h>
183 #else /* AFS_LINUX22_ENV */
184 # if defined(AFS_DARWIN_ENV)
185 # ifndef _MACH_ETAP_H_
186 # define _MACH_ETAP_H_
187 typedef unsigned short etap_event_t
;
191 # include "h/errno.h"
192 # include "h/types.h"
193 # include "h/param.h"
200 # include "h/region.h"
202 # include "h/sysmacros.h"
203 # include "h/signal.h"
205 # endif /* AFS_AUX_ENV */
207 # include "h/systm.h"
211 # include <sys/socket.h>
213 # include <net/if_var.h>
217 # ifdef AFS_AIX41_ENV
218 # include "sys/statfs.h"
220 # ifdef AFS_AIX51_ENV
221 # include "sys/acl.h"
223 # include "../h/file.h"
224 # include "../h/fullstat.h"
225 # include "../h/vattr.h"
226 # include "../h/var.h"
227 # include "../h/access.h"
228 # endif /* AFS_AIX_ENV */
230 # if defined(AFS_SGI_ENV)
232 # include "sys/sema.h"
233 # include "sys/cmn_err.h"
234 # ifdef AFS_SGI64_ENV
235 # include <ksys/behavior.h>
236 /* in 6.5.20f, ksys/behavior.h doesn't bother to define BHV_IS_BHVL,
237 * but sys/vnode.h uses it in VNODE_TO_FIRST_BHV. It looks like from
238 * older headers like we want the old behavior, so we fake it. */
239 # if defined(BHV_PREPARE) && !defined(CELL_CAPABLE)
240 # define BHV_IS_BHVL(bhp) (0)
242 # endif /* AFS_SGI64_ENV */
243 # include "fs/efs_inode.h"
244 # include "sys/kmem.h"
245 # include "sys/cred.h"
246 # include "sys/resource.h"
249 * ../sys/debug.h defines ASSERT(), but it is nontrivial only if DEBUG
250 * is on (see afs_osi.h).
251 * In IRIX 6.5 we cannot have DEBUG turned on since certain
252 * system-defined structures have different members with DEBUG on, and
253 * this breaks our ability to interact with the rest of the kernel.
255 * Instead of using ASSERT(), we use our own osi_Assert().
257 # if defined(AFS_SGI65_ENV) && !defined(DEBUG)
259 # include "sys/debug.h"
262 # include "sys/debug.h"
265 # include "sys/statvfs.h"
266 # include "sys/sysmacros.h"
267 # include "sys/fs_subr.h"
268 # include "sys/siginfo.h"
270 # endif /* AFS_SGI_ENV */
272 # if !defined(AFS_AIX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_SGI_ENV)
273 # include "h/kernel.h"
274 # endif /* !SUN5 && !SGI */
277 # include <sys/cmn_err.h> /* for kernel printf() prototype */
278 # include "h/vfs.h" /* stops SUN5 socketvar.h warnings */
279 # include "h/stropts.h" /* stops SUN5 socketvar.h warnings */
280 # include "h/stream.h" /* stops SUN5 socketvar.h errors */
283 # ifdef AFS_SUN510_ENV
284 # include <sys/cred_impl.h>
285 # include <sys/policy.h>
288 # include "h/socket.h"
289 # include "h/socketvar.h"
290 # include "h/protosw.h"
292 # if defined(AFS_FBSD_ENV)
293 # include "sys/limits.h"
300 # if defined(AFS_SGI_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_SUN5_ENV) || \
301 defined(AFS_FBSD_ENV) || defined(AFS_NBSD40_ENV)
302 # include "h/dirent.h"
304 # include "h/sysmacros.h"
305 # include "h/fs/ufs_fsdir.h"
306 # endif /* AFS_SUN5_ENV */
309 # endif /* SGI || SUN || HPUX */
311 # if !defined(AFS_SGI64_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_DARWIN80_ENV) && \
312 !defined(AFS_NBSD40_ENV)
314 # endif /* AFS_SGI64_ENV */
315 # define MACH_USER_API 1
316 # if defined(AFS_FBSD_ENV)
318 # include "h/filedesc.h"
326 /* ----- The following mainly deal with vnodes/inodes stuff ------ */
328 # include "h/statvfs.h"
329 # endif /* AFS_SUN5_ENV */
331 struct vfspage
; /* for vnode.h compiler warnings */
332 # include "h/swap.h" /* for struct swpdbd, for vnode.h compiler warnings */
333 # include "h/dbd.h" /* for union idbd, for vnode.h compiler warnings */
334 # ifdef AFS_HPUX110_ENV
335 # include "h/resource.h"
337 # ifdef AFS_HPUX1123_ENV
338 # include <sys/user.h>
339 # include <sys/cred.h>
341 # endif /* AFS_HPUX_ENV */
342 # if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
343 # if defined(AFS_FBSD_ENV)
344 struct vop_getwritemount_args
;
346 # include <sys/uio.h>
347 # include <sys/mount.h>
348 # include <sys/namei.h>
349 # ifdef AFS_DARWIN80_ENV
350 # include <sys/kauth.h>
353 # include <sys/vnode.h>
354 # include <sys/queue.h>
355 # ifndef AFS_NBSD40_ENV
356 # include <sys/malloc.h>
359 MALLOC_DECLARE(M_AFS
);
360 # include <ufs/ufs/dinode.h>
362 # include <vm/vm_extern.h>
363 # include <vm/pmap.h>
364 # include <vm/vm_map.h>
365 # include <sys/lock.h>
366 # include <sys/user.h>
368 # include <sys/ubc.h>
369 # define timeout_fcn_t mach_timeout_fcn_t
370 # include <kern/sched_prim.h>
372 # undef timeout_fcn_t
374 # define doff_t int32_t
375 # ifndef AFS_DARWIN80_ENV
376 # include <ufs/ufs/quota.h>
377 # include <ufs/ufs/inode.h>
378 # include <ufs/ffs/fs.h>
381 # ifndef AFS_NBSD40_ENV
383 # include "h/vnode.h"
386 # include "h/fs/ufs_inode.h"
387 # include "h/fs/ufs_mount.h"
389 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_NBSD40_ENV)
390 # include "ufs/inode.h"
391 # if !defined(AFS_SGI_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_NBSD40_ENV)
392 # include "ufs/mount.h"
393 # endif /* !AFS_HPUX_ENV */
394 # endif /* !AFS_AIX32_ENV */
395 # endif /* AFS_SUN5_ENV */
396 # endif /* AFS_DARWIN_ENV || AFS_FBSD_ENV */
398 /* These mainly deal with networking and rpc headers */
399 # include "netinet/in.h"
400 # undef MFREE /* defined at mount.h for AIX */
404 # if !defined(AFS_HPUX_ENV)
407 # endif /* AFS_SUN5_ENV */
409 # include "rpc/types.h"
412 /* Miscellaneous headers */
414 # if !defined(AFS_FBSD_ENV)
415 # include "h/ioctl.h"
416 # endif /* AFS_FBSD_ENV */
418 # if defined(AFS_HPUX101_ENV) && !defined(AFS_HPUX1123_ENV)
419 # include "h/proc_iface.h"
423 # if defined(AFS_HPUX102_ENV)
424 # include "h/unistd.h"
428 # if !defined(AFS_SGI_ENV) && !defined(AFS_AIX32_ENV) && !defined(AFS_HPUX_ENV) && !defined(AFS_SUN5_ENV) && !defined(AFS_DARWIN_ENV) && !defined(AFS_FBSD_ENV) && !defined(AFS_NBSD40_ENV)
434 # if defined(AFS_AIX_ENV)
435 # include "h/flock.h" /* fcntl.h is a user-level include in aix */
437 # include "h/fcntl.h"
440 # if defined(AFS_SGI_ENV) || defined(AFS_SUN5_ENV)
441 # include "h/unistd.h"
442 # endif /* SGI || SUN */
444 # ifdef AFS_AIX32_ENV
445 # include "h/vmuser.h"
446 # endif /* AFS_AIX32_ENV */
448 # if defined(AFS_SUN5_ENV)
449 # include <sys/tiuser.h>
450 # include <sys/t_lock.h>
451 # include <sys/mutex.h>
452 # include <sys/vtrace.h>
453 # include <sys/pathname.h>
454 # include <sys/debug.h>
457 #endif /* AFS_LINUX22_ENV */
459 #endif /* __AFS_SYSINCLUDESH__ so idempotent */