3 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
7 * The contents of this file constitute Original Code as defined in and
8 * are subject to the Apple Public Source License Version 1.1 (the
9 * "License"). You may not use this file except in compliance with the
10 * License. Please obtain a copy of the License at
11 * http://www.apple.com/publicsource and read it before using this file.
13 * This Original Code and all software distributed under the License are
14 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
18 * License for the specific language governing rights and limitations
21 * @APPLE_LICENSE_HEADER_END@
24 * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
25 * Copyright (c) 1992, 1993, 1994, 1995
26 * The Regents of the University of California. All rights reserved.
28 * Redistribution and use in source and binary forms, with or without
29 * modification, are permitted provided that the following conditions
31 * 1. Redistributions of source code must retain the above copyright
32 * notice, this list of conditions and the following disclaimer.
33 * 2. Redistributions in binary form must reproduce the above copyright
34 * notice, this list of conditions and the following disclaimer in the
35 * documentation and/or other materials provided with the distribution.
36 * 3. All advertising materials mentioning features or use of this software
37 * must display the following acknowledgement:
38 * This product includes software developed by the University of
39 * California, Berkeley and its contributors.
40 * 4. Neither the name of the University nor the names of its contributors
41 * may be used to endorse or promote products derived from this software
42 * without specific prior written permission.
44 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND
45 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
46 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
47 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
48 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
49 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
50 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
51 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
52 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
53 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59 * Warning: This file is generated automatically.
60 * (Modifications made here may easily be lost!)
62 * Created by the script:
63 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
67 #ifndef _SYS_VNODE_IF_H_
68 #define _SYS_VNODE_IF_H_
70 #include <sys/appleapiopts.h>
72 #ifdef __APPLE_API_UNSTABLE
73 extern struct vnodeop_desc vop_default_desc
;
76 struct vop_lookup_args
{
77 struct vnodeop_desc
*a_desc
;
80 struct componentname
*a_cnp
;
82 extern struct vnodeop_desc vop_lookup_desc
;
83 #define VOP_LOOKUP(dvp, vpp, cnp) _VOP_LOOKUP(dvp, vpp, cnp)
84 static __inline
int _VOP_LOOKUP(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
)
86 struct vop_lookup_args a
;
87 a
.a_desc
= VDESC(vop_lookup
);
91 return (VCALL(dvp
, VOFFSET(vop_lookup
), &a
));
94 struct vop_cachedlookup_args
{
95 struct vnodeop_desc
*a_desc
;
98 struct componentname
*a_cnp
;
100 extern struct vnodeop_desc vop_cachedlookup_desc
;
101 #define VOP_CACHEDLOOKUP(dvp, vpp, cnp) _VOP_CACHEDLOOKUP(dvp, vpp, cnp)
102 static __inline
int _VOP_CACHEDLOOKUP(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
)
104 struct vop_cachedlookup_args a
;
105 a
.a_desc
= VDESC(vop_cachedlookup
);
109 return (VCALL(dvp
, VOFFSET(vop_cachedlookup
), &a
));
112 struct vop_create_args
{
113 struct vnodeop_desc
*a_desc
;
115 struct vnode
**a_vpp
;
116 struct componentname
*a_cnp
;
119 extern struct vnodeop_desc vop_create_desc
;
120 #define VOP_CREATE(dvp, vpp, cnp, vap) _VOP_CREATE(dvp, vpp, cnp, vap)
121 static __inline
int _VOP_CREATE(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
123 struct vop_create_args a
;
124 a
.a_desc
= VDESC(vop_create
);
129 return (VCALL(dvp
, VOFFSET(vop_create
), &a
));
132 struct vop_whiteout_args
{
133 struct vnodeop_desc
*a_desc
;
135 struct componentname
*a_cnp
;
138 extern struct vnodeop_desc vop_whiteout_desc
;
139 #define VOP_WHITEOUT(dvp, cnp, flags) _VOP_WHITEOUT(dvp, cnp, flags)
140 static __inline
int _VOP_WHITEOUT(struct vnode
*dvp
, struct componentname
*cnp
, int flags
)
142 struct vop_whiteout_args a
;
143 a
.a_desc
= VDESC(vop_whiteout
);
147 return (VCALL(dvp
, VOFFSET(vop_whiteout
), &a
));
150 struct vop_mknod_args
{
151 struct vnodeop_desc
*a_desc
;
153 struct vnode
**a_vpp
;
154 struct componentname
*a_cnp
;
157 extern struct vnodeop_desc vop_mknod_desc
;
158 #define VOP_MKNOD(dvp, vpp, cnp, vap) _VOP_MKNOD(dvp, vpp, cnp, vap)
159 static __inline
int _VOP_MKNOD(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
161 struct vop_mknod_args a
;
162 a
.a_desc
= VDESC(vop_mknod
);
167 return (VCALL(dvp
, VOFFSET(vop_mknod
), &a
));
170 struct vop_mkcomplex_args
{
171 struct vnodeop_desc
*a_desc
;
173 struct vnode
**a_vpp
;
174 struct componentname
*a_cnp
;
178 extern struct vnodeop_desc vop_mkcomplex_desc
;
179 #define VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type) _VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type)
180 static __inline
int _VOP_MKCOMPLEX(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
, u_long type
)
182 struct vop_mkcomplex_args a
;
183 a
.a_desc
= VDESC(vop_mkcomplex
);
189 return (VCALL(dvp
, VOFFSET(vop_mkcomplex
), &a
));
192 struct vop_open_args
{
193 struct vnodeop_desc
*a_desc
;
196 struct ucred
*a_cred
;
199 extern struct vnodeop_desc vop_open_desc
;
200 #define VOP_OPEN(vp, mode, cred, p) _VOP_OPEN(vp, mode, cred, p)
201 static __inline
int _VOP_OPEN(struct vnode
*vp
, int mode
, struct ucred
*cred
, struct proc
*p
)
203 struct vop_open_args a
;
204 a
.a_desc
= VDESC(vop_open
);
209 return (VCALL(vp
, VOFFSET(vop_open
), &a
));
212 struct vop_close_args
{
213 struct vnodeop_desc
*a_desc
;
216 struct ucred
*a_cred
;
219 extern struct vnodeop_desc vop_close_desc
;
220 #define VOP_CLOSE(vp, fflag, cred, p) _VOP_CLOSE(vp, fflag, cred, p)
221 static __inline
int _VOP_CLOSE(struct vnode
*vp
, int fflag
, struct ucred
*cred
, struct proc
*p
)
223 struct vop_close_args a
;
224 a
.a_desc
= VDESC(vop_close
);
229 return (VCALL(vp
, VOFFSET(vop_close
), &a
));
232 struct vop_access_args
{
233 struct vnodeop_desc
*a_desc
;
236 struct ucred
*a_cred
;
239 extern struct vnodeop_desc vop_access_desc
;
240 #define VOP_ACCESS(vp, mode, cred, p) _VOP_ACCESS(vp, mode, cred, p)
241 static __inline
int _VOP_ACCESS(struct vnode
*vp
, int mode
, struct ucred
*cred
, struct proc
*p
)
243 struct vop_access_args a
;
244 a
.a_desc
= VDESC(vop_access
);
249 return (VCALL(vp
, VOFFSET(vop_access
), &a
));
252 struct vop_getattr_args
{
253 struct vnodeop_desc
*a_desc
;
256 struct ucred
*a_cred
;
259 extern struct vnodeop_desc vop_getattr_desc
;
260 #define VOP_GETATTR(vp, vap, cred, p) _VOP_GETATTR(vp, vap, cred, p)
261 static __inline
int _VOP_GETATTR(struct vnode
*vp
, struct vattr
*vap
, struct ucred
*cred
, struct proc
*p
)
263 struct vop_getattr_args a
;
264 a
.a_desc
= VDESC(vop_getattr
);
269 return (VCALL(vp
, VOFFSET(vop_getattr
), &a
));
272 struct vop_setattr_args
{
273 struct vnodeop_desc
*a_desc
;
276 struct ucred
*a_cred
;
279 extern struct vnodeop_desc vop_setattr_desc
;
280 #define VOP_SETATTR(vp, vap, cred, p) _VOP_SETATTR(vp, vap, cred, p)
281 static __inline
int _VOP_SETATTR(struct vnode
*vp
, struct vattr
*vap
, struct ucred
*cred
, struct proc
*p
)
283 struct vop_setattr_args a
;
284 a
.a_desc
= VDESC(vop_setattr
);
289 return (VCALL(vp
, VOFFSET(vop_setattr
), &a
));
292 struct vop_getattrlist_args
{
293 struct vnodeop_desc
*a_desc
;
295 struct attrlist
*a_alist
;
297 struct ucred
*a_cred
;
300 extern struct vnodeop_desc vop_getattrlist_desc
;
301 #define VOP_GETATTRLIST(vp, alist, uio, cred, p) _VOP_GETATTRLIST(vp, alist, uio, cred, p)
302 static __inline
int _VOP_GETATTRLIST(struct vnode
*vp
, struct attrlist
*alist
, struct uio
*uio
, struct ucred
*cred
, struct proc
*p
)
304 struct vop_getattrlist_args a
;
305 a
.a_desc
= VDESC(vop_getattrlist
);
311 return (VCALL(vp
, VOFFSET(vop_getattrlist
), &a
));
314 struct vop_setattrlist_args
{
315 struct vnodeop_desc
*a_desc
;
317 struct attrlist
*a_alist
;
319 struct ucred
*a_cred
;
322 extern struct vnodeop_desc vop_setattrlist_desc
;
323 #define VOP_SETATTRLIST(vp, alist, uio, cred, p) _VOP_SETATTRLIST(vp, alist, uio, cred, p)
324 static __inline
int _VOP_SETATTRLIST(struct vnode
*vp
, struct attrlist
*alist
, struct uio
*uio
, struct ucred
*cred
, struct proc
*p
)
326 struct vop_setattrlist_args a
;
327 a
.a_desc
= VDESC(vop_setattrlist
);
333 return (VCALL(vp
, VOFFSET(vop_setattrlist
), &a
));
336 struct vop_read_args
{
337 struct vnodeop_desc
*a_desc
;
341 struct ucred
*a_cred
;
343 extern struct vnodeop_desc vop_read_desc
;
344 #define VOP_READ(vp, uio, ioflag, cred) _VOP_READ(vp, uio, ioflag, cred)
345 static __inline
int _VOP_READ(struct vnode
*vp
, struct uio
*uio
, int ioflag
, struct ucred
*cred
)
347 struct vop_read_args a
;
348 a
.a_desc
= VDESC(vop_read
);
355 extern int ubc_hold(struct vnode
*vp
);
356 extern void ubc_rele(struct vnode
*vp
);
357 int _didhold
= ubc_hold(vp
);
358 _err
= VCALL(vp
, VOFFSET(vop_read
), &a
);
365 struct vop_write_args
{
366 struct vnodeop_desc
*a_desc
;
370 struct ucred
*a_cred
;
372 extern struct vnodeop_desc vop_write_desc
;
373 #define VOP_WRITE(vp, uio, ioflag, cred) _VOP_WRITE(vp, uio, ioflag, cred)
374 static __inline
int _VOP_WRITE(struct vnode
*vp
, struct uio
*uio
, int ioflag
, struct ucred
*cred
)
376 struct vop_write_args a
;
377 a
.a_desc
= VDESC(vop_write
);
384 extern int ubc_hold(struct vnode
*vp
);
385 extern void ubc_rele(struct vnode
*vp
);
386 int _didhold
= ubc_hold(vp
);
387 _err
= VCALL(vp
, VOFFSET(vop_write
), &a
);
394 struct vop_lease_args
{
395 struct vnodeop_desc
*a_desc
;
398 struct ucred
*a_cred
;
401 extern struct vnodeop_desc vop_lease_desc
;
402 #define VOP_LEASE(vp, p, cred, flag) _VOP_LEASE(vp, p, cred, flag)
403 static __inline
int _VOP_LEASE(struct vnode
*vp
, struct proc
*p
, struct ucred
*cred
, int flag
)
405 struct vop_lease_args a
;
406 a
.a_desc
= VDESC(vop_lease
);
411 return (VCALL(vp
, VOFFSET(vop_lease
), &a
));
414 struct vop_ioctl_args
{
415 struct vnodeop_desc
*a_desc
;
420 struct ucred
*a_cred
;
423 extern struct vnodeop_desc vop_ioctl_desc
;
424 #define VOP_IOCTL(vp, command, data, fflag, cred, p) _VOP_IOCTL(vp, command, data, fflag, cred, p)
425 static __inline
int _VOP_IOCTL(struct vnode
*vp
, u_long command
, caddr_t data
, int fflag
, struct ucred
*cred
, struct proc
*p
)
427 struct vop_ioctl_args a
;
428 a
.a_desc
= VDESC(vop_ioctl
);
430 a
.a_command
= command
;
435 return (VCALL(vp
, VOFFSET(vop_ioctl
), &a
));
438 struct vop_select_args
{
439 struct vnodeop_desc
*a_desc
;
443 struct ucred
*a_cred
;
447 extern struct vnodeop_desc vop_select_desc
;
448 #define VOP_SELECT(vp, which, fflags, cred, wql, p) _VOP_SELECT(vp, which, fflags, cred, wql, p)
449 static __inline
int _VOP_SELECT(struct vnode
*vp
, int which
, int fflags
, struct ucred
*cred
, void *wql
, struct proc
*p
)
451 struct vop_select_args a
;
452 a
.a_desc
= VDESC(vop_select
);
459 return (VCALL(vp
, VOFFSET(vop_select
), &a
));
462 struct vop_exchange_args
{
463 struct vnodeop_desc
*a_desc
;
466 struct ucred
*a_cred
;
469 extern struct vnodeop_desc vop_exchange_desc
;
470 #define VOP_EXCHANGE(fvp, tvp, cred, p) _VOP_EXCHANGE(fvp, tvp, cred, p)
471 static __inline
int _VOP_EXCHANGE(struct vnode
*fvp
, struct vnode
*tvp
, struct ucred
*cred
, struct proc
*p
)
473 struct vop_exchange_args a
;
474 a
.a_desc
= VDESC(vop_exchange
);
479 return (VCALL(fvp
, VOFFSET(vop_exchange
), &a
));
482 struct vop_revoke_args
{
483 struct vnodeop_desc
*a_desc
;
487 extern struct vnodeop_desc vop_revoke_desc
;
488 #define VOP_REVOKE(vp, flags) _VOP_REVOKE(vp, flags)
489 static __inline
int _VOP_REVOKE(struct vnode
*vp
, int flags
)
491 struct vop_revoke_args a
;
492 a
.a_desc
= VDESC(vop_revoke
);
495 return (VCALL(vp
, VOFFSET(vop_revoke
), &a
));
498 struct vop_mmap_args
{
499 struct vnodeop_desc
*a_desc
;
502 struct ucred
*a_cred
;
505 extern struct vnodeop_desc vop_mmap_desc
;
506 #define VOP_MMAP(vp, fflags, cred, p) _VOP_MMAP(vp, fflags, cred, p)
507 static __inline
int _VOP_MMAP(struct vnode
*vp
, int fflags
, struct ucred
*cred
, struct proc
*p
)
509 struct vop_mmap_args a
;
510 a
.a_desc
= VDESC(vop_mmap
);
515 return (VCALL(vp
, VOFFSET(vop_mmap
), &a
));
518 struct vop_fsync_args
{
519 struct vnodeop_desc
*a_desc
;
521 struct ucred
*a_cred
;
525 extern struct vnodeop_desc vop_fsync_desc
;
526 #define VOP_FSYNC(vp, cred, waitfor, p) _VOP_FSYNC(vp, cred, waitfor, p)
527 static __inline
int _VOP_FSYNC(struct vnode
*vp
, struct ucred
*cred
, int waitfor
, struct proc
*p
)
529 struct vop_fsync_args a
;
530 a
.a_desc
= VDESC(vop_fsync
);
533 a
.a_waitfor
= waitfor
;
537 extern int ubc_hold(struct vnode
*vp
);
538 extern void ubc_rele(struct vnode
*vp
);
539 int _didhold
= ubc_hold(vp
);
540 _err
= VCALL(vp
, VOFFSET(vop_fsync
), &a
);
547 struct vop_seek_args
{
548 struct vnodeop_desc
*a_desc
;
552 struct ucred
*a_cred
;
554 extern struct vnodeop_desc vop_seek_desc
;
555 #define VOP_SEEK(vp, oldoff, newoff, cred) _VOP_SEEK(vp, oldoff, newoff, cred)
556 static __inline
int _VOP_SEEK(struct vnode
*vp
, off_t oldoff
, off_t newoff
, struct ucred
*cred
)
558 struct vop_seek_args a
;
559 a
.a_desc
= VDESC(vop_seek
);
564 return (VCALL(vp
, VOFFSET(vop_seek
), &a
));
567 struct vop_remove_args
{
568 struct vnodeop_desc
*a_desc
;
571 struct componentname
*a_cnp
;
573 extern struct vnodeop_desc vop_remove_desc
;
574 #define VOP_REMOVE(dvp, vp, cnp) _VOP_REMOVE(dvp, vp, cnp)
575 static __inline
int _VOP_REMOVE(struct vnode
*dvp
, struct vnode
*vp
, struct componentname
*cnp
)
577 struct vop_remove_args a
;
578 a
.a_desc
= VDESC(vop_remove
);
582 return (VCALL(dvp
, VOFFSET(vop_remove
), &a
));
585 struct vop_link_args
{
586 struct vnodeop_desc
*a_desc
;
588 struct vnode
*a_tdvp
;
589 struct componentname
*a_cnp
;
591 extern struct vnodeop_desc vop_link_desc
;
592 #define VOP_LINK(vp, tdvp, cnp) _VOP_LINK(vp, tdvp, cnp)
593 static __inline
int _VOP_LINK(struct vnode
*vp
, struct vnode
*tdvp
, struct componentname
*cnp
)
595 struct vop_link_args a
;
596 a
.a_desc
= VDESC(vop_link
);
600 return (VCALL(vp
, VOFFSET(vop_link
), &a
));
603 struct vop_rename_args
{
604 struct vnodeop_desc
*a_desc
;
605 struct vnode
*a_fdvp
;
607 struct componentname
*a_fcnp
;
608 struct vnode
*a_tdvp
;
610 struct componentname
*a_tcnp
;
612 extern struct vnodeop_desc vop_rename_desc
;
613 #define VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp) _VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
614 static __inline
int _VOP_RENAME(struct vnode
*fdvp
, struct vnode
*fvp
, struct componentname
*fcnp
, struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
)
616 struct vop_rename_args a
;
617 a
.a_desc
= VDESC(vop_rename
);
624 return (VCALL(fdvp
, VOFFSET(vop_rename
), &a
));
627 struct vop_mkdir_args
{
628 struct vnodeop_desc
*a_desc
;
630 struct vnode
**a_vpp
;
631 struct componentname
*a_cnp
;
634 extern struct vnodeop_desc vop_mkdir_desc
;
635 #define VOP_MKDIR(dvp, vpp, cnp, vap) _VOP_MKDIR(dvp, vpp, cnp, vap)
636 static __inline
int _VOP_MKDIR(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
638 struct vop_mkdir_args a
;
639 a
.a_desc
= VDESC(vop_mkdir
);
644 return (VCALL(dvp
, VOFFSET(vop_mkdir
), &a
));
647 struct vop_rmdir_args
{
648 struct vnodeop_desc
*a_desc
;
651 struct componentname
*a_cnp
;
653 extern struct vnodeop_desc vop_rmdir_desc
;
654 #define VOP_RMDIR(dvp, vp, cnp) _VOP_RMDIR(dvp, vp, cnp)
655 static __inline
int _VOP_RMDIR(struct vnode
*dvp
, struct vnode
*vp
, struct componentname
*cnp
)
657 struct vop_rmdir_args a
;
658 a
.a_desc
= VDESC(vop_rmdir
);
662 return (VCALL(dvp
, VOFFSET(vop_rmdir
), &a
));
665 struct vop_symlink_args
{
666 struct vnodeop_desc
*a_desc
;
668 struct vnode
**a_vpp
;
669 struct componentname
*a_cnp
;
673 extern struct vnodeop_desc vop_symlink_desc
;
674 #define VOP_SYMLINK(dvp, vpp, cnp, vap, target) _VOP_SYMLINK(dvp, vpp, cnp, vap, target)
675 static __inline
int _VOP_SYMLINK(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
, char *target
)
677 struct vop_symlink_args a
;
678 a
.a_desc
= VDESC(vop_symlink
);
684 return (VCALL(dvp
, VOFFSET(vop_symlink
), &a
));
687 struct vop_readdir_args
{
688 struct vnodeop_desc
*a_desc
;
691 struct ucred
*a_cred
;
696 extern struct vnodeop_desc vop_readdir_desc
;
697 #define VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies) _VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies)
698 static __inline
int _VOP_READDIR(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
, int *eofflag
, int *ncookies
, u_long
**cookies
)
700 struct vop_readdir_args a
;
701 a
.a_desc
= VDESC(vop_readdir
);
705 a
.a_eofflag
= eofflag
;
706 a
.a_ncookies
= ncookies
;
707 a
.a_cookies
= cookies
;
708 return (VCALL(vp
, VOFFSET(vop_readdir
), &a
));
711 struct vop_readdirattr_args
{
712 struct vnodeop_desc
*a_desc
;
714 struct attrlist
*a_alist
;
720 u_long
*a_actualcount
;
722 struct ucred
*a_cred
;
724 extern struct vnodeop_desc vop_readdirattr_desc
;
725 #define VOP_READDIRATTR(vp, alist, uio, maxcount, options, newstate, eofflag, actualcount, cookies, cred) _VOP_READDIRATTR(vp, alist, uio, maxcount, options, newstate, eofflag, actualcount, cookies, cred)
726 static __inline
int _VOP_READDIRATTR(struct vnode
*vp
, struct attrlist
*alist
, struct uio
*uio
, u_long maxcount
, u_long options
, u_long
*newstate
, int *eofflag
, u_long
*actualcount
, u_long
**cookies
, struct ucred
*cred
)
728 struct vop_readdirattr_args a
;
729 a
.a_desc
= VDESC(vop_readdirattr
);
733 a
.a_maxcount
= maxcount
;
734 a
.a_options
= options
;
735 a
.a_newstate
= newstate
;
736 a
.a_eofflag
= eofflag
;
737 a
.a_actualcount
= actualcount
;
738 a
.a_cookies
= cookies
;
740 return (VCALL(vp
, VOFFSET(vop_readdirattr
), &a
));
743 struct vop_readlink_args
{
744 struct vnodeop_desc
*a_desc
;
747 struct ucred
*a_cred
;
749 extern struct vnodeop_desc vop_readlink_desc
;
750 #define VOP_READLINK(vp, uio, cred) _VOP_READLINK(vp, uio, cred)
751 static __inline
int _VOP_READLINK(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
)
753 struct vop_readlink_args a
;
754 a
.a_desc
= VDESC(vop_readlink
);
758 return (VCALL(vp
, VOFFSET(vop_readlink
), &a
));
761 struct vop_abortop_args
{
762 struct vnodeop_desc
*a_desc
;
764 struct componentname
*a_cnp
;
766 extern struct vnodeop_desc vop_abortop_desc
;
767 #define VOP_ABORTOP(dvp, cnp) _VOP_ABORTOP(dvp, cnp)
768 static __inline
int _VOP_ABORTOP(struct vnode
*dvp
, struct componentname
*cnp
)
770 struct vop_abortop_args a
;
771 a
.a_desc
= VDESC(vop_abortop
);
774 return (VCALL(dvp
, VOFFSET(vop_abortop
), &a
));
777 struct vop_inactive_args
{
778 struct vnodeop_desc
*a_desc
;
782 extern struct vnodeop_desc vop_inactive_desc
;
783 #define VOP_INACTIVE(vp, p) _VOP_INACTIVE(vp, p)
784 static __inline
int _VOP_INACTIVE(struct vnode
*vp
, struct proc
*p
)
786 struct vop_inactive_args a
;
787 a
.a_desc
= VDESC(vop_inactive
);
790 return (VCALL(vp
, VOFFSET(vop_inactive
), &a
));
793 struct vop_reclaim_args
{
794 struct vnodeop_desc
*a_desc
;
798 extern struct vnodeop_desc vop_reclaim_desc
;
799 #define VOP_RECLAIM(vp, p) _VOP_RECLAIM(vp, p)
800 static __inline
int _VOP_RECLAIM(struct vnode
*vp
, struct proc
*p
)
802 struct vop_reclaim_args a
;
803 a
.a_desc
= VDESC(vop_reclaim
);
806 return (VCALL(vp
, VOFFSET(vop_reclaim
), &a
));
809 struct vop_lock_args
{
810 struct vnodeop_desc
*a_desc
;
815 extern struct vnodeop_desc vop_lock_desc
;
816 #define VOP_LOCK(vp, flags, p) _VOP_LOCK(vp, flags, p)
817 static __inline
int _VOP_LOCK(struct vnode
*vp
, int flags
, struct proc
*p
)
819 struct vop_lock_args a
;
820 a
.a_desc
= VDESC(vop_lock
);
824 return (VCALL(vp
, VOFFSET(vop_lock
), &a
));
827 struct vop_unlock_args
{
828 struct vnodeop_desc
*a_desc
;
833 extern struct vnodeop_desc vop_unlock_desc
;
834 #define VOP_UNLOCK(vp, flags, p) _VOP_UNLOCK(vp, flags, p)
835 static __inline
int _VOP_UNLOCK(struct vnode
*vp
, int flags
, struct proc
*p
)
837 struct vop_unlock_args a
;
838 a
.a_desc
= VDESC(vop_unlock
);
842 return (VCALL(vp
, VOFFSET(vop_unlock
), &a
));
845 struct vop_bmap_args
{
846 struct vnodeop_desc
*a_desc
;
849 struct vnode
**a_vpp
;
853 extern struct vnodeop_desc vop_bmap_desc
;
854 #define VOP_BMAP(vp, bn, vpp, bnp, runp) _VOP_BMAP(vp, bn, vpp, bnp, runp)
855 static __inline
int _VOP_BMAP(struct vnode
*vp
, daddr_t bn
, struct vnode
**vpp
, daddr_t
*bnp
, int *runp
)
857 struct vop_bmap_args a
;
858 a
.a_desc
= VDESC(vop_bmap
);
864 return (VCALL(vp
, VOFFSET(vop_bmap
), &a
));
867 struct vop_print_args
{
868 struct vnodeop_desc
*a_desc
;
871 extern struct vnodeop_desc vop_print_desc
;
872 #define VOP_PRINT(vp) _VOP_PRINT(vp)
873 static __inline
int _VOP_PRINT(struct vnode
*vp
)
875 struct vop_print_args a
;
876 a
.a_desc
= VDESC(vop_print
);
878 return (VCALL(vp
, VOFFSET(vop_print
), &a
));
881 struct vop_islocked_args
{
882 struct vnodeop_desc
*a_desc
;
885 extern struct vnodeop_desc vop_islocked_desc
;
886 #define VOP_ISLOCKED(vp) _VOP_ISLOCKED(vp)
887 static __inline
int _VOP_ISLOCKED(struct vnode
*vp
)
889 struct vop_islocked_args a
;
890 a
.a_desc
= VDESC(vop_islocked
);
892 return (VCALL(vp
, VOFFSET(vop_islocked
), &a
));
895 struct vop_pathconf_args
{
896 struct vnodeop_desc
*a_desc
;
899 register_t
*a_retval
;
901 extern struct vnodeop_desc vop_pathconf_desc
;
902 #define VOP_PATHCONF(vp, name, retval) _VOP_PATHCONF(vp, name, retval)
903 static __inline
int _VOP_PATHCONF(struct vnode
*vp
, int name
, register_t
*retval
)
905 struct vop_pathconf_args a
;
906 a
.a_desc
= VDESC(vop_pathconf
);
910 return (VCALL(vp
, VOFFSET(vop_pathconf
), &a
));
913 struct vop_advlock_args
{
914 struct vnodeop_desc
*a_desc
;
921 extern struct vnodeop_desc vop_advlock_desc
;
922 #define VOP_ADVLOCK(vp, id, op, fl, flags) _VOP_ADVLOCK(vp, id, op, fl, flags)
923 static __inline
int _VOP_ADVLOCK(struct vnode
*vp
, caddr_t id
, int op
, struct flock
*fl
, int flags
)
925 struct vop_advlock_args a
;
926 a
.a_desc
= VDESC(vop_advlock
);
932 return (VCALL(vp
, VOFFSET(vop_advlock
), &a
));
935 struct vop_blkatoff_args
{
936 struct vnodeop_desc
*a_desc
;
942 extern struct vnodeop_desc vop_blkatoff_desc
;
943 #define VOP_BLKATOFF(vp, offset, res, bpp) _VOP_BLKATOFF(vp, offset, res, bpp)
944 static __inline
int _VOP_BLKATOFF(struct vnode
*vp
, off_t offset
, char **res
, struct buf
**bpp
)
946 struct vop_blkatoff_args a
;
947 a
.a_desc
= VDESC(vop_blkatoff
);
952 return (VCALL(vp
, VOFFSET(vop_blkatoff
), &a
));
955 struct vop_valloc_args
{
956 struct vnodeop_desc
*a_desc
;
959 struct ucred
*a_cred
;
960 struct vnode
**a_vpp
;
962 extern struct vnodeop_desc vop_valloc_desc
;
963 #define VOP_VALLOC(pvp, mode, cred, vpp) _VOP_VALLOC(pvp, mode, cred, vpp)
964 static __inline
int _VOP_VALLOC(struct vnode
*pvp
, int mode
, struct ucred
*cred
, struct vnode
**vpp
)
966 struct vop_valloc_args a
;
967 a
.a_desc
= VDESC(vop_valloc
);
972 return (VCALL(pvp
, VOFFSET(vop_valloc
), &a
));
975 struct vop_reallocblks_args
{
976 struct vnodeop_desc
*a_desc
;
978 struct cluster_save
*a_buflist
;
980 extern struct vnodeop_desc vop_reallocblks_desc
;
981 #define VOP_REALLOCBLKS(vp, buflist) _VOP_REALLOCBLKS(vp, buflist)
982 static __inline
int _VOP_REALLOCBLKS(struct vnode
*vp
, struct cluster_save
*buflist
)
984 struct vop_reallocblks_args a
;
985 a
.a_desc
= VDESC(vop_reallocblks
);
987 a
.a_buflist
= buflist
;
988 return (VCALL(vp
, VOFFSET(vop_reallocblks
), &a
));
991 struct vop_vfree_args
{
992 struct vnodeop_desc
*a_desc
;
997 extern struct vnodeop_desc vop_vfree_desc
;
998 #define VOP_VFREE(pvp, ino, mode) _VOP_VFREE(pvp, ino, mode)
999 static __inline
int _VOP_VFREE(struct vnode
*pvp
, ino_t ino
, int mode
)
1001 struct vop_vfree_args a
;
1002 a
.a_desc
= VDESC(vop_vfree
);
1006 return (VCALL(pvp
, VOFFSET(vop_vfree
), &a
));
1009 struct vop_truncate_args
{
1010 struct vnodeop_desc
*a_desc
;
1014 struct ucred
*a_cred
;
1017 extern struct vnodeop_desc vop_truncate_desc
;
1018 #define VOP_TRUNCATE(vp, length, flags, cred, p) _VOP_TRUNCATE(vp, length, flags, cred, p)
1019 static __inline
int _VOP_TRUNCATE(struct vnode
*vp
, off_t length
, int flags
, struct ucred
*cred
, struct proc
*p
)
1021 struct vop_truncate_args a
;
1022 a
.a_desc
= VDESC(vop_truncate
);
1024 a
.a_length
= length
;
1030 extern int ubc_hold(struct vnode
*vp
);
1031 extern void ubc_rele(struct vnode
*vp
);
1032 int _didhold
= ubc_hold(vp
);
1033 _err
= VCALL(vp
, VOFFSET(vop_truncate
), &a
);
1040 struct vop_allocate_args
{
1041 struct vnodeop_desc
*a_desc
;
1045 off_t
*a_bytesallocated
;
1047 struct ucred
*a_cred
;
1050 extern struct vnodeop_desc vop_allocate_desc
;
1051 #define VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p) _VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p)
1052 static __inline
int _VOP_ALLOCATE(struct vnode
*vp
, off_t length
, u_int32_t flags
, off_t
*bytesallocated
, off_t offset
, struct ucred
*cred
, struct proc
*p
)
1054 struct vop_allocate_args a
;
1055 a
.a_desc
= VDESC(vop_allocate
);
1057 a
.a_length
= length
;
1059 a
.a_bytesallocated
= bytesallocated
;
1060 a
.a_offset
= offset
;
1063 return (VCALL(vp
, VOFFSET(vop_allocate
), &a
));
1066 struct vop_update_args
{
1067 struct vnodeop_desc
*a_desc
;
1069 struct timeval
*a_access
;
1070 struct timeval
*a_modify
;
1073 extern struct vnodeop_desc vop_update_desc
;
1074 #define VOP_UPDATE(vp, access, modify, waitfor) _VOP_UPDATE(vp, access, modify, waitfor)
1075 static __inline
int _VOP_UPDATE(struct vnode
*vp
, struct timeval
*access
, struct timeval
*modify
, int waitfor
)
1077 struct vop_update_args a
;
1078 a
.a_desc
= VDESC(vop_update
);
1080 a
.a_access
= access
;
1081 a
.a_modify
= modify
;
1082 a
.a_waitfor
= waitfor
;
1083 return (VCALL(vp
, VOFFSET(vop_update
), &a
));
1086 struct vop_pgrd_args
{
1087 struct vnodeop_desc
*a_desc
;
1090 struct ucred
*a_cred
;
1092 extern struct vnodeop_desc vop_pgrd_desc
;
1093 #define VOP_PGRD(vp, uio, cred) _VOP_PGRD(vp, uio, cred)
1094 static __inline
int _VOP_PGRD(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
)
1096 struct vop_pgrd_args a
;
1097 a
.a_desc
= VDESC(vop_pgrd
);
1101 return (VCALL(vp
, VOFFSET(vop_pgrd
), &a
));
1104 struct vop_pgwr_args
{
1105 struct vnodeop_desc
*a_desc
;
1108 struct ucred
*a_cred
;
1109 vm_offset_t a_offset
;
1111 extern struct vnodeop_desc vop_pgwr_desc
;
1112 #define VOP_PGWR(vp, uio, cred, offset) _VOP_PGWR(vp, uio, cred, offset)
1113 static __inline
int _VOP_PGWR(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
, vm_offset_t offset
)
1115 struct vop_pgwr_args a
;
1116 a
.a_desc
= VDESC(vop_pgwr
);
1120 a
.a_offset
= offset
;
1121 return (VCALL(vp
, VOFFSET(vop_pgwr
), &a
));
1124 struct vop_pagein_args
{
1125 struct vnodeop_desc
*a_desc
;
1128 vm_offset_t a_pl_offset
;
1131 struct ucred
*a_cred
;
1134 extern struct vnodeop_desc vop_pagein_desc
;
1135 #define VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags)
1136 static __inline
int _VOP_PAGEIN(struct vnode
*vp
, upl_t pl
, vm_offset_t pl_offset
, off_t f_offset
, size_t size
, struct ucred
*cred
, int flags
)
1138 struct vop_pagein_args a
;
1139 a
.a_desc
= VDESC(vop_pagein
);
1142 a
.a_pl_offset
= pl_offset
;
1143 a
.a_f_offset
= f_offset
;
1147 return (VCALL(vp
, VOFFSET(vop_pagein
), &a
));
1150 struct vop_pageout_args
{
1151 struct vnodeop_desc
*a_desc
;
1154 vm_offset_t a_pl_offset
;
1157 struct ucred
*a_cred
;
1160 extern struct vnodeop_desc vop_pageout_desc
;
1161 #define VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags)
1162 static __inline
int _VOP_PAGEOUT(struct vnode
*vp
, upl_t pl
, vm_offset_t pl_offset
, off_t f_offset
, size_t size
, struct ucred
*cred
, int flags
)
1164 struct vop_pageout_args a
;
1165 a
.a_desc
= VDESC(vop_pageout
);
1168 a
.a_pl_offset
= pl_offset
;
1169 a
.a_f_offset
= f_offset
;
1173 return (VCALL(vp
, VOFFSET(vop_pageout
), &a
));
1176 struct vop_devblocksize_args
{
1177 struct vnodeop_desc
*a_desc
;
1179 register_t
*a_retval
;
1181 extern struct vnodeop_desc vop_devblocksize_desc
;
1182 #define VOP_DEVBLOCKSIZE(vp, retval) _VOP_DEVBLOCKSIZE(vp, retval)
1183 static __inline
int _VOP_DEVBLOCKSIZE(struct vnode
*vp
, register_t
*retval
)
1185 struct vop_devblocksize_args a
;
1186 a
.a_desc
= VDESC(vop_devblocksize
);
1188 a
.a_retval
= retval
;
1189 return (VCALL(vp
, VOFFSET(vop_devblocksize
), &a
));
1192 struct vop_searchfs_args
{
1193 struct vnodeop_desc
*a_desc
;
1195 void *a_searchparams1
;
1196 void *a_searchparams2
;
1197 struct attrlist
*a_searchattrs
;
1198 u_long a_maxmatches
;
1199 struct timeval
*a_timelimit
;
1200 struct attrlist
*a_returnattrs
;
1201 u_long
*a_nummatches
;
1202 u_long a_scriptcode
;
1205 struct searchstate
*a_searchstate
;
1207 extern struct vnodeop_desc vop_searchfs_desc
;
1208 #define VOP_SEARCHFS(vp, searchparams1, searchparams2, searchattrs, maxmatches, timelimit, returnattrs, nummatches, scriptcode, options, uio, searchstate) _VOP_SEARCHFS(vp, searchparams1, searchparams2, searchattrs, maxmatches, timelimit, returnattrs, nummatches, scriptcode, options, uio, searchstate)
1209 static __inline
int _VOP_SEARCHFS(struct vnode
*vp
, void *searchparams1
, void *searchparams2
, struct attrlist
*searchattrs
, u_long maxmatches
, struct timeval
*timelimit
, struct attrlist
*returnattrs
, u_long
*nummatches
, u_long scriptcode
, u_long options
, struct uio
*uio
, struct searchstate
*searchstate
)
1211 struct vop_searchfs_args a
;
1212 a
.a_desc
= VDESC(vop_searchfs
);
1214 a
.a_searchparams1
= searchparams1
;
1215 a
.a_searchparams2
= searchparams2
;
1216 a
.a_searchattrs
= searchattrs
;
1217 a
.a_maxmatches
= maxmatches
;
1218 a
.a_timelimit
= timelimit
;
1219 a
.a_returnattrs
= returnattrs
;
1220 a
.a_nummatches
= nummatches
;
1221 a
.a_scriptcode
= scriptcode
;
1222 a
.a_options
= options
;
1224 a
.a_searchstate
= searchstate
;
1225 return (VCALL(vp
, VOFFSET(vop_searchfs
), &a
));
1228 struct vop_copyfile_args
{
1229 struct vnodeop_desc
*a_desc
;
1230 struct vnode
*a_fvp
;
1231 struct vnode
*a_tdvp
;
1232 struct vnode
*a_tvp
;
1233 struct componentname
*a_tcnp
;
1237 extern struct vnodeop_desc vop_copyfile_desc
;
1238 #define VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags) _VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags)
1239 static __inline
int _VOP_COPYFILE(struct vnode
*fvp
, struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
, int mode
, int flags
)
1241 struct vop_copyfile_args a
;
1242 a
.a_desc
= VDESC(vop_copyfile
);
1249 return (VCALL(fvp
, VOFFSET(vop_copyfile
), &a
));
1252 struct vop_blktooff_args
{
1253 struct vnodeop_desc
*a_desc
;
1258 extern struct vnodeop_desc vop_blktooff_desc
;
1259 #define VOP_BLKTOOFF(vp, lblkno, offset) _VOP_BLKTOOFF(vp, lblkno, offset)
1260 static __inline
int _VOP_BLKTOOFF(struct vnode
*vp
, daddr_t lblkno
, off_t
*offset
)
1262 struct vop_blktooff_args a
;
1263 a
.a_desc
= VDESC(vop_blktooff
);
1265 a
.a_lblkno
= lblkno
;
1266 a
.a_offset
= offset
;
1267 return (VCALL(vp
, VOFFSET(vop_blktooff
), &a
));
1270 struct vop_offtoblk_args
{
1271 struct vnodeop_desc
*a_desc
;
1276 extern struct vnodeop_desc vop_offtoblk_desc
;
1277 #define VOP_OFFTOBLK(vp, offset, lblkno) _VOP_OFFTOBLK(vp, offset, lblkno)
1278 static __inline
int _VOP_OFFTOBLK(struct vnode
*vp
, off_t offset
, daddr_t
*lblkno
)
1280 struct vop_offtoblk_args a
;
1281 a
.a_desc
= VDESC(vop_offtoblk
);
1283 a
.a_offset
= offset
;
1284 a
.a_lblkno
= lblkno
;
1285 return (VCALL(vp
, VOFFSET(vop_offtoblk
), &a
));
1288 struct vop_cmap_args
{
1289 struct vnodeop_desc
*a_desc
;
1297 extern struct vnodeop_desc vop_cmap_desc
;
1298 #define VOP_CMAP(vp, foffset, size, bpn, run, poff) _VOP_CMAP(vp, foffset, size, bpn, run, poff)
1299 static __inline
int _VOP_CMAP(struct vnode
*vp
, off_t foffset
, size_t size
, daddr_t
*bpn
, size_t *run
, void *poff
)
1301 struct vop_cmap_args a
;
1302 a
.a_desc
= VDESC(vop_cmap
);
1304 a
.a_foffset
= foffset
;
1309 return (VCALL(vp
, VOFFSET(vop_cmap
), &a
));
1312 /* Special cases: */
1313 #include <sys/buf.h>
1316 struct vop_strategy_args
{
1317 struct vnodeop_desc
*a_desc
;
1320 extern struct vnodeop_desc vop_strategy_desc
;
1321 #define VOP_STRATEGY(bp) _VOP_STRATEGY(bp)
1322 static __inline
int _VOP_STRATEGY(struct buf
*bp
)
1324 struct vop_strategy_args a
;
1325 a
.a_desc
= VDESC(vop_strategy
);
1327 return (VCALL(bp
->b_vp
, VOFFSET(vop_strategy
), &a
));
1330 struct vop_bwrite_args
{
1331 struct vnodeop_desc
*a_desc
;
1334 extern struct vnodeop_desc vop_bwrite_desc
;
1335 #define VOP_BWRITE(bp) _VOP_BWRITE(bp)
1336 static __inline
int _VOP_BWRITE(struct buf
*bp
)
1338 struct vop_bwrite_args a
;
1339 a
.a_desc
= VDESC(vop_bwrite
);
1341 return (VCALL(bp
->b_vp
, VOFFSET(vop_bwrite
), &a
));
1344 /* End of special cases. */
1346 #endif /* __APPLE_API_UNSTABLE */
1347 #endif /* !_SYS_VNODE_IF_H_ */