3 * Copyright (c) 2000-2002 Apple Computer, Inc. All rights reserved.
5 * @APPLE_LICENSE_HEADER_START@
7 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
9 * This file contains Original Code and/or Modifications of Original Code
10 * as defined in and that are subject to the Apple Public Source License
11 * Version 2.0 (the 'License'). You may not use this file except in
12 * compliance with the License. Please obtain a copy of the License at
13 * http://www.opensource.apple.com/apsl/ and read it before using this
16 * The Original Code and all software distributed under the License are
17 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
18 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
19 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
20 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
21 * Please see the License for the specific language governing rights and
22 * limitations under the License.
24 * @APPLE_LICENSE_HEADER_END@
27 * Copyright (c) 1995 NeXT Computer, Inc. All Rights Reserved
28 * Copyright (c) 1992, 1993, 1994, 1995
29 * The Regents of the University of California. All rights reserved.
31 * Redistribution and use in source and binary forms, with or without
32 * modification, are permitted provided that the following conditions
34 * 1. Redistributions of source code must retain the above copyright
35 * notice, this list of conditions and the following disclaimer.
36 * 2. Redistributions in binary form must reproduce the above copyright
37 * notice, this list of conditions and the following disclaimer in the
38 * documentation and/or other materials provided with the distribution.
39 * 3. All advertising materials mentioning features or use of this software
40 * must display the following acknowledgement:
41 * This product includes software developed by the University of
42 * California, Berkeley and its contributors.
43 * 4. Neither the name of the University nor the names of its contributors
44 * may be used to endorse or promote products derived from this software
45 * without specific prior written permission.
47 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS AND
48 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
49 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
50 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
51 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
52 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
53 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
54 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
55 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
56 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
62 * Warning: This file is generated automatically.
63 * (Modifications made here may easily be lost!)
65 * Created by the script:
66 * @(#)vnode_if.sh 8.7 (Berkeley) 5/11/95
70 #ifndef _SYS_VNODE_IF_H_
71 #define _SYS_VNODE_IF_H_
73 #include <sys/appleapiopts.h>
75 #ifdef __APPLE_API_UNSTABLE
76 extern struct vnodeop_desc vop_default_desc
;
79 struct vop_lookup_args
{
80 struct vnodeop_desc
*a_desc
;
83 struct componentname
*a_cnp
;
85 extern struct vnodeop_desc vop_lookup_desc
;
86 #define VOP_LOOKUP(dvp, vpp, cnp) _VOP_LOOKUP(dvp, vpp, cnp)
87 static __inline
int _VOP_LOOKUP(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
)
89 struct vop_lookup_args a
;
90 a
.a_desc
= VDESC(vop_lookup
);
94 return (VCALL(dvp
, VOFFSET(vop_lookup
), &a
));
97 struct vop_cachedlookup_args
{
98 struct vnodeop_desc
*a_desc
;
100 struct vnode
**a_vpp
;
101 struct componentname
*a_cnp
;
103 extern struct vnodeop_desc vop_cachedlookup_desc
;
104 #define VOP_CACHEDLOOKUP(dvp, vpp, cnp) _VOP_CACHEDLOOKUP(dvp, vpp, cnp)
105 static __inline
int _VOP_CACHEDLOOKUP(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
)
107 struct vop_cachedlookup_args a
;
108 a
.a_desc
= VDESC(vop_cachedlookup
);
112 return (VCALL(dvp
, VOFFSET(vop_cachedlookup
), &a
));
115 struct vop_create_args
{
116 struct vnodeop_desc
*a_desc
;
118 struct vnode
**a_vpp
;
119 struct componentname
*a_cnp
;
122 extern struct vnodeop_desc vop_create_desc
;
123 #define VOP_CREATE(dvp, vpp, cnp, vap) _VOP_CREATE(dvp, vpp, cnp, vap)
124 static __inline
int _VOP_CREATE(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
126 struct vop_create_args a
;
127 a
.a_desc
= VDESC(vop_create
);
132 return (VCALL(dvp
, VOFFSET(vop_create
), &a
));
135 struct vop_whiteout_args
{
136 struct vnodeop_desc
*a_desc
;
138 struct componentname
*a_cnp
;
141 extern struct vnodeop_desc vop_whiteout_desc
;
142 #define VOP_WHITEOUT(dvp, cnp, flags) _VOP_WHITEOUT(dvp, cnp, flags)
143 static __inline
int _VOP_WHITEOUT(struct vnode
*dvp
, struct componentname
*cnp
, int flags
)
145 struct vop_whiteout_args a
;
146 a
.a_desc
= VDESC(vop_whiteout
);
150 return (VCALL(dvp
, VOFFSET(vop_whiteout
), &a
));
153 struct vop_mknod_args
{
154 struct vnodeop_desc
*a_desc
;
156 struct vnode
**a_vpp
;
157 struct componentname
*a_cnp
;
160 extern struct vnodeop_desc vop_mknod_desc
;
161 #define VOP_MKNOD(dvp, vpp, cnp, vap) _VOP_MKNOD(dvp, vpp, cnp, vap)
162 static __inline
int _VOP_MKNOD(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
164 struct vop_mknod_args a
;
165 a
.a_desc
= VDESC(vop_mknod
);
170 return (VCALL(dvp
, VOFFSET(vop_mknod
), &a
));
173 struct vop_mkcomplex_args
{
174 struct vnodeop_desc
*a_desc
;
176 struct vnode
**a_vpp
;
177 struct componentname
*a_cnp
;
181 extern struct vnodeop_desc vop_mkcomplex_desc
;
182 #define VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type) _VOP_MKCOMPLEX(dvp, vpp, cnp, vap, type)
183 static __inline
int _VOP_MKCOMPLEX(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
, u_long type
)
185 struct vop_mkcomplex_args a
;
186 a
.a_desc
= VDESC(vop_mkcomplex
);
192 return (VCALL(dvp
, VOFFSET(vop_mkcomplex
), &a
));
195 struct vop_open_args
{
196 struct vnodeop_desc
*a_desc
;
199 struct ucred
*a_cred
;
202 extern struct vnodeop_desc vop_open_desc
;
203 #define VOP_OPEN(vp, mode, cred, p) _VOP_OPEN(vp, mode, cred, p)
204 static __inline
int _VOP_OPEN(struct vnode
*vp
, int mode
, struct ucred
*cred
, struct proc
*p
)
206 struct vop_open_args a
;
207 a
.a_desc
= VDESC(vop_open
);
212 return (VCALL(vp
, VOFFSET(vop_open
), &a
));
215 struct vop_close_args
{
216 struct vnodeop_desc
*a_desc
;
219 struct ucred
*a_cred
;
222 extern struct vnodeop_desc vop_close_desc
;
223 #define VOP_CLOSE(vp, fflag, cred, p) _VOP_CLOSE(vp, fflag, cred, p)
224 static __inline
int _VOP_CLOSE(struct vnode
*vp
, int fflag
, struct ucred
*cred
, struct proc
*p
)
226 struct vop_close_args a
;
227 a
.a_desc
= VDESC(vop_close
);
232 return (VCALL(vp
, VOFFSET(vop_close
), &a
));
235 struct vop_access_args
{
236 struct vnodeop_desc
*a_desc
;
239 struct ucred
*a_cred
;
242 extern struct vnodeop_desc vop_access_desc
;
243 #define VOP_ACCESS(vp, mode, cred, p) _VOP_ACCESS(vp, mode, cred, p)
244 static __inline
int _VOP_ACCESS(struct vnode
*vp
, int mode
, struct ucred
*cred
, struct proc
*p
)
246 struct vop_access_args a
;
247 a
.a_desc
= VDESC(vop_access
);
252 return (VCALL(vp
, VOFFSET(vop_access
), &a
));
255 struct vop_getattr_args
{
256 struct vnodeop_desc
*a_desc
;
259 struct ucred
*a_cred
;
262 extern struct vnodeop_desc vop_getattr_desc
;
263 #define VOP_GETATTR(vp, vap, cred, p) _VOP_GETATTR(vp, vap, cred, p)
264 static __inline
int _VOP_GETATTR(struct vnode
*vp
, struct vattr
*vap
, struct ucred
*cred
, struct proc
*p
)
266 struct vop_getattr_args a
;
267 a
.a_desc
= VDESC(vop_getattr
);
272 return (VCALL(vp
, VOFFSET(vop_getattr
), &a
));
275 struct vop_setattr_args
{
276 struct vnodeop_desc
*a_desc
;
279 struct ucred
*a_cred
;
282 extern struct vnodeop_desc vop_setattr_desc
;
283 #define VOP_SETATTR(vp, vap, cred, p) _VOP_SETATTR(vp, vap, cred, p)
284 static __inline
int _VOP_SETATTR(struct vnode
*vp
, struct vattr
*vap
, struct ucred
*cred
, struct proc
*p
)
286 struct vop_setattr_args a
;
287 a
.a_desc
= VDESC(vop_setattr
);
292 return (VCALL(vp
, VOFFSET(vop_setattr
), &a
));
295 struct vop_getattrlist_args
{
296 struct vnodeop_desc
*a_desc
;
298 struct attrlist
*a_alist
;
300 struct ucred
*a_cred
;
303 extern struct vnodeop_desc vop_getattrlist_desc
;
304 #define VOP_GETATTRLIST(vp, alist, uio, cred, p) _VOP_GETATTRLIST(vp, alist, uio, cred, p)
305 static __inline
int _VOP_GETATTRLIST(struct vnode
*vp
, struct attrlist
*alist
, struct uio
*uio
, struct ucred
*cred
, struct proc
*p
)
307 struct vop_getattrlist_args a
;
308 a
.a_desc
= VDESC(vop_getattrlist
);
314 return (VCALL(vp
, VOFFSET(vop_getattrlist
), &a
));
317 struct vop_setattrlist_args
{
318 struct vnodeop_desc
*a_desc
;
320 struct attrlist
*a_alist
;
322 struct ucred
*a_cred
;
325 extern struct vnodeop_desc vop_setattrlist_desc
;
326 #define VOP_SETATTRLIST(vp, alist, uio, cred, p) _VOP_SETATTRLIST(vp, alist, uio, cred, p)
327 static __inline
int _VOP_SETATTRLIST(struct vnode
*vp
, struct attrlist
*alist
, struct uio
*uio
, struct ucred
*cred
, struct proc
*p
)
329 struct vop_setattrlist_args a
;
330 a
.a_desc
= VDESC(vop_setattrlist
);
336 return (VCALL(vp
, VOFFSET(vop_setattrlist
), &a
));
339 struct vop_read_args
{
340 struct vnodeop_desc
*a_desc
;
344 struct ucred
*a_cred
;
346 extern struct vnodeop_desc vop_read_desc
;
347 #define VOP_READ(vp, uio, ioflag, cred) _VOP_READ(vp, uio, ioflag, cred)
348 static __inline
int _VOP_READ(struct vnode
*vp
, struct uio
*uio
, int ioflag
, struct ucred
*cred
)
350 struct vop_read_args a
;
351 a
.a_desc
= VDESC(vop_read
);
358 extern int ubc_hold(struct vnode
*vp
);
359 extern void ubc_rele(struct vnode
*vp
);
360 int _didhold
= ubc_hold(vp
);
361 _err
= VCALL(vp
, VOFFSET(vop_read
), &a
);
368 struct vop_write_args
{
369 struct vnodeop_desc
*a_desc
;
373 struct ucred
*a_cred
;
375 extern struct vnodeop_desc vop_write_desc
;
376 #define VOP_WRITE(vp, uio, ioflag, cred) _VOP_WRITE(vp, uio, ioflag, cred)
377 static __inline
int _VOP_WRITE(struct vnode
*vp
, struct uio
*uio
, int ioflag
, struct ucred
*cred
)
379 struct vop_write_args a
;
380 a
.a_desc
= VDESC(vop_write
);
387 extern int ubc_hold(struct vnode
*vp
);
388 extern void ubc_rele(struct vnode
*vp
);
389 int _didhold
= ubc_hold(vp
);
390 _err
= VCALL(vp
, VOFFSET(vop_write
), &a
);
397 struct vop_lease_args
{
398 struct vnodeop_desc
*a_desc
;
401 struct ucred
*a_cred
;
404 extern struct vnodeop_desc vop_lease_desc
;
405 #define VOP_LEASE(vp, p, cred, flag) _VOP_LEASE(vp, p, cred, flag)
406 static __inline
int _VOP_LEASE(struct vnode
*vp
, struct proc
*p
, struct ucred
*cred
, int flag
)
408 struct vop_lease_args a
;
409 a
.a_desc
= VDESC(vop_lease
);
414 return (VCALL(vp
, VOFFSET(vop_lease
), &a
));
417 struct vop_ioctl_args
{
418 struct vnodeop_desc
*a_desc
;
423 struct ucred
*a_cred
;
426 extern struct vnodeop_desc vop_ioctl_desc
;
427 #define VOP_IOCTL(vp, command, data, fflag, cred, p) _VOP_IOCTL(vp, command, data, fflag, cred, p)
428 static __inline
int _VOP_IOCTL(struct vnode
*vp
, u_long command
, caddr_t data
, int fflag
, struct ucred
*cred
, struct proc
*p
)
430 struct vop_ioctl_args a
;
431 a
.a_desc
= VDESC(vop_ioctl
);
433 a
.a_command
= command
;
438 return (VCALL(vp
, VOFFSET(vop_ioctl
), &a
));
441 struct vop_select_args
{
442 struct vnodeop_desc
*a_desc
;
446 struct ucred
*a_cred
;
450 extern struct vnodeop_desc vop_select_desc
;
451 #define VOP_SELECT(vp, which, fflags, cred, wql, p) _VOP_SELECT(vp, which, fflags, cred, wql, p)
452 static __inline
int _VOP_SELECT(struct vnode
*vp
, int which
, int fflags
, struct ucred
*cred
, void *wql
, struct proc
*p
)
454 struct vop_select_args a
;
455 a
.a_desc
= VDESC(vop_select
);
462 return (VCALL(vp
, VOFFSET(vop_select
), &a
));
465 struct vop_exchange_args
{
466 struct vnodeop_desc
*a_desc
;
469 struct ucred
*a_cred
;
472 extern struct vnodeop_desc vop_exchange_desc
;
473 #define VOP_EXCHANGE(fvp, tvp, cred, p) _VOP_EXCHANGE(fvp, tvp, cred, p)
474 static __inline
int _VOP_EXCHANGE(struct vnode
*fvp
, struct vnode
*tvp
, struct ucred
*cred
, struct proc
*p
)
476 struct vop_exchange_args a
;
477 a
.a_desc
= VDESC(vop_exchange
);
482 return (VCALL(fvp
, VOFFSET(vop_exchange
), &a
));
485 struct vop_revoke_args
{
486 struct vnodeop_desc
*a_desc
;
490 extern struct vnodeop_desc vop_revoke_desc
;
491 #define VOP_REVOKE(vp, flags) _VOP_REVOKE(vp, flags)
492 static __inline
int _VOP_REVOKE(struct vnode
*vp
, int flags
)
494 struct vop_revoke_args a
;
495 a
.a_desc
= VDESC(vop_revoke
);
498 return (VCALL(vp
, VOFFSET(vop_revoke
), &a
));
501 struct vop_mmap_args
{
502 struct vnodeop_desc
*a_desc
;
505 struct ucred
*a_cred
;
508 extern struct vnodeop_desc vop_mmap_desc
;
509 #define VOP_MMAP(vp, fflags, cred, p) _VOP_MMAP(vp, fflags, cred, p)
510 static __inline
int _VOP_MMAP(struct vnode
*vp
, int fflags
, struct ucred
*cred
, struct proc
*p
)
512 struct vop_mmap_args a
;
513 a
.a_desc
= VDESC(vop_mmap
);
518 return (VCALL(vp
, VOFFSET(vop_mmap
), &a
));
521 struct vop_fsync_args
{
522 struct vnodeop_desc
*a_desc
;
524 struct ucred
*a_cred
;
528 extern struct vnodeop_desc vop_fsync_desc
;
529 #define VOP_FSYNC(vp, cred, waitfor, p) _VOP_FSYNC(vp, cred, waitfor, p)
530 static __inline
int _VOP_FSYNC(struct vnode
*vp
, struct ucred
*cred
, int waitfor
, struct proc
*p
)
532 struct vop_fsync_args a
;
533 a
.a_desc
= VDESC(vop_fsync
);
536 a
.a_waitfor
= waitfor
;
540 extern int ubc_hold(struct vnode
*vp
);
541 extern void ubc_rele(struct vnode
*vp
);
542 int _didhold
= ubc_hold(vp
);
543 _err
= VCALL(vp
, VOFFSET(vop_fsync
), &a
);
550 struct vop_seek_args
{
551 struct vnodeop_desc
*a_desc
;
555 struct ucred
*a_cred
;
557 extern struct vnodeop_desc vop_seek_desc
;
558 #define VOP_SEEK(vp, oldoff, newoff, cred) _VOP_SEEK(vp, oldoff, newoff, cred)
559 static __inline
int _VOP_SEEK(struct vnode
*vp
, off_t oldoff
, off_t newoff
, struct ucred
*cred
)
561 struct vop_seek_args a
;
562 a
.a_desc
= VDESC(vop_seek
);
567 return (VCALL(vp
, VOFFSET(vop_seek
), &a
));
570 struct vop_remove_args
{
571 struct vnodeop_desc
*a_desc
;
574 struct componentname
*a_cnp
;
576 extern struct vnodeop_desc vop_remove_desc
;
577 #define VOP_REMOVE(dvp, vp, cnp) _VOP_REMOVE(dvp, vp, cnp)
578 static __inline
int _VOP_REMOVE(struct vnode
*dvp
, struct vnode
*vp
, struct componentname
*cnp
)
580 struct vop_remove_args a
;
581 a
.a_desc
= VDESC(vop_remove
);
585 return (VCALL(dvp
, VOFFSET(vop_remove
), &a
));
588 struct vop_link_args
{
589 struct vnodeop_desc
*a_desc
;
591 struct vnode
*a_tdvp
;
592 struct componentname
*a_cnp
;
594 extern struct vnodeop_desc vop_link_desc
;
595 #define VOP_LINK(vp, tdvp, cnp) _VOP_LINK(vp, tdvp, cnp)
596 static __inline
int _VOP_LINK(struct vnode
*vp
, struct vnode
*tdvp
, struct componentname
*cnp
)
598 struct vop_link_args a
;
599 a
.a_desc
= VDESC(vop_link
);
603 return (VCALL(vp
, VOFFSET(vop_link
), &a
));
606 struct vop_rename_args
{
607 struct vnodeop_desc
*a_desc
;
608 struct vnode
*a_fdvp
;
610 struct componentname
*a_fcnp
;
611 struct vnode
*a_tdvp
;
613 struct componentname
*a_tcnp
;
615 extern struct vnodeop_desc vop_rename_desc
;
616 #define VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp) _VOP_RENAME(fdvp, fvp, fcnp, tdvp, tvp, tcnp)
617 static __inline
int _VOP_RENAME(struct vnode
*fdvp
, struct vnode
*fvp
, struct componentname
*fcnp
, struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
)
619 struct vop_rename_args a
;
620 a
.a_desc
= VDESC(vop_rename
);
627 return (VCALL(fdvp
, VOFFSET(vop_rename
), &a
));
630 struct vop_mkdir_args
{
631 struct vnodeop_desc
*a_desc
;
633 struct vnode
**a_vpp
;
634 struct componentname
*a_cnp
;
637 extern struct vnodeop_desc vop_mkdir_desc
;
638 #define VOP_MKDIR(dvp, vpp, cnp, vap) _VOP_MKDIR(dvp, vpp, cnp, vap)
639 static __inline
int _VOP_MKDIR(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
)
641 struct vop_mkdir_args a
;
642 a
.a_desc
= VDESC(vop_mkdir
);
647 return (VCALL(dvp
, VOFFSET(vop_mkdir
), &a
));
650 struct vop_rmdir_args
{
651 struct vnodeop_desc
*a_desc
;
654 struct componentname
*a_cnp
;
656 extern struct vnodeop_desc vop_rmdir_desc
;
657 #define VOP_RMDIR(dvp, vp, cnp) _VOP_RMDIR(dvp, vp, cnp)
658 static __inline
int _VOP_RMDIR(struct vnode
*dvp
, struct vnode
*vp
, struct componentname
*cnp
)
660 struct vop_rmdir_args a
;
661 a
.a_desc
= VDESC(vop_rmdir
);
665 return (VCALL(dvp
, VOFFSET(vop_rmdir
), &a
));
668 struct vop_symlink_args
{
669 struct vnodeop_desc
*a_desc
;
671 struct vnode
**a_vpp
;
672 struct componentname
*a_cnp
;
676 extern struct vnodeop_desc vop_symlink_desc
;
677 #define VOP_SYMLINK(dvp, vpp, cnp, vap, target) _VOP_SYMLINK(dvp, vpp, cnp, vap, target)
678 static __inline
int _VOP_SYMLINK(struct vnode
*dvp
, struct vnode
**vpp
, struct componentname
*cnp
, struct vattr
*vap
, char *target
)
680 struct vop_symlink_args a
;
681 a
.a_desc
= VDESC(vop_symlink
);
687 return (VCALL(dvp
, VOFFSET(vop_symlink
), &a
));
690 struct vop_readdir_args
{
691 struct vnodeop_desc
*a_desc
;
694 struct ucred
*a_cred
;
699 extern struct vnodeop_desc vop_readdir_desc
;
700 #define VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies) _VOP_READDIR(vp, uio, cred, eofflag, ncookies, cookies)
701 static __inline
int _VOP_READDIR(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
, int *eofflag
, int *ncookies
, u_long
**cookies
)
703 struct vop_readdir_args a
;
704 a
.a_desc
= VDESC(vop_readdir
);
708 a
.a_eofflag
= eofflag
;
709 a
.a_ncookies
= ncookies
;
710 a
.a_cookies
= cookies
;
711 return (VCALL(vp
, VOFFSET(vop_readdir
), &a
));
714 struct vop_readdirattr_args
{
715 struct vnodeop_desc
*a_desc
;
717 struct attrlist
*a_alist
;
723 u_long
*a_actualcount
;
725 struct ucred
*a_cred
;
727 extern struct vnodeop_desc vop_readdirattr_desc
;
728 #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)
729 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
)
731 struct vop_readdirattr_args a
;
732 a
.a_desc
= VDESC(vop_readdirattr
);
736 a
.a_maxcount
= maxcount
;
737 a
.a_options
= options
;
738 a
.a_newstate
= newstate
;
739 a
.a_eofflag
= eofflag
;
740 a
.a_actualcount
= actualcount
;
741 a
.a_cookies
= cookies
;
743 return (VCALL(vp
, VOFFSET(vop_readdirattr
), &a
));
746 struct vop_readlink_args
{
747 struct vnodeop_desc
*a_desc
;
750 struct ucred
*a_cred
;
752 extern struct vnodeop_desc vop_readlink_desc
;
753 #define VOP_READLINK(vp, uio, cred) _VOP_READLINK(vp, uio, cred)
754 static __inline
int _VOP_READLINK(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
)
756 struct vop_readlink_args a
;
757 a
.a_desc
= VDESC(vop_readlink
);
761 return (VCALL(vp
, VOFFSET(vop_readlink
), &a
));
764 struct vop_abortop_args
{
765 struct vnodeop_desc
*a_desc
;
767 struct componentname
*a_cnp
;
769 extern struct vnodeop_desc vop_abortop_desc
;
770 #define VOP_ABORTOP(dvp, cnp) _VOP_ABORTOP(dvp, cnp)
771 static __inline
int _VOP_ABORTOP(struct vnode
*dvp
, struct componentname
*cnp
)
773 struct vop_abortop_args a
;
774 a
.a_desc
= VDESC(vop_abortop
);
777 return (VCALL(dvp
, VOFFSET(vop_abortop
), &a
));
780 struct vop_inactive_args
{
781 struct vnodeop_desc
*a_desc
;
785 extern struct vnodeop_desc vop_inactive_desc
;
786 #define VOP_INACTIVE(vp, p) _VOP_INACTIVE(vp, p)
787 static __inline
int _VOP_INACTIVE(struct vnode
*vp
, struct proc
*p
)
789 struct vop_inactive_args a
;
790 a
.a_desc
= VDESC(vop_inactive
);
793 return (VCALL(vp
, VOFFSET(vop_inactive
), &a
));
796 struct vop_reclaim_args
{
797 struct vnodeop_desc
*a_desc
;
801 extern struct vnodeop_desc vop_reclaim_desc
;
802 #define VOP_RECLAIM(vp, p) _VOP_RECLAIM(vp, p)
803 static __inline
int _VOP_RECLAIM(struct vnode
*vp
, struct proc
*p
)
805 struct vop_reclaim_args a
;
806 a
.a_desc
= VDESC(vop_reclaim
);
809 return (VCALL(vp
, VOFFSET(vop_reclaim
), &a
));
812 struct vop_lock_args
{
813 struct vnodeop_desc
*a_desc
;
818 extern struct vnodeop_desc vop_lock_desc
;
819 #define VOP_LOCK(vp, flags, p) _VOP_LOCK(vp, flags, p)
820 static __inline
int _VOP_LOCK(struct vnode
*vp
, int flags
, struct proc
*p
)
822 struct vop_lock_args a
;
823 a
.a_desc
= VDESC(vop_lock
);
827 return (VCALL(vp
, VOFFSET(vop_lock
), &a
));
830 struct vop_unlock_args
{
831 struct vnodeop_desc
*a_desc
;
836 extern struct vnodeop_desc vop_unlock_desc
;
837 #define VOP_UNLOCK(vp, flags, p) _VOP_UNLOCK(vp, flags, p)
838 static __inline
int _VOP_UNLOCK(struct vnode
*vp
, int flags
, struct proc
*p
)
840 struct vop_unlock_args a
;
841 a
.a_desc
= VDESC(vop_unlock
);
845 return (VCALL(vp
, VOFFSET(vop_unlock
), &a
));
848 struct vop_bmap_args
{
849 struct vnodeop_desc
*a_desc
;
852 struct vnode
**a_vpp
;
856 extern struct vnodeop_desc vop_bmap_desc
;
857 #define VOP_BMAP(vp, bn, vpp, bnp, runp) _VOP_BMAP(vp, bn, vpp, bnp, runp)
858 static __inline
int _VOP_BMAP(struct vnode
*vp
, daddr_t bn
, struct vnode
**vpp
, daddr_t
*bnp
, int *runp
)
860 struct vop_bmap_args a
;
861 a
.a_desc
= VDESC(vop_bmap
);
867 return (VCALL(vp
, VOFFSET(vop_bmap
), &a
));
870 struct vop_print_args
{
871 struct vnodeop_desc
*a_desc
;
874 extern struct vnodeop_desc vop_print_desc
;
875 #define VOP_PRINT(vp) _VOP_PRINT(vp)
876 static __inline
int _VOP_PRINT(struct vnode
*vp
)
878 struct vop_print_args a
;
879 a
.a_desc
= VDESC(vop_print
);
881 return (VCALL(vp
, VOFFSET(vop_print
), &a
));
884 struct vop_islocked_args
{
885 struct vnodeop_desc
*a_desc
;
888 extern struct vnodeop_desc vop_islocked_desc
;
889 #define VOP_ISLOCKED(vp) _VOP_ISLOCKED(vp)
890 static __inline
int _VOP_ISLOCKED(struct vnode
*vp
)
892 struct vop_islocked_args a
;
893 a
.a_desc
= VDESC(vop_islocked
);
895 return (VCALL(vp
, VOFFSET(vop_islocked
), &a
));
898 struct vop_pathconf_args
{
899 struct vnodeop_desc
*a_desc
;
902 register_t
*a_retval
;
904 extern struct vnodeop_desc vop_pathconf_desc
;
905 #define VOP_PATHCONF(vp, name, retval) _VOP_PATHCONF(vp, name, retval)
906 static __inline
int _VOP_PATHCONF(struct vnode
*vp
, int name
, register_t
*retval
)
908 struct vop_pathconf_args a
;
909 a
.a_desc
= VDESC(vop_pathconf
);
913 return (VCALL(vp
, VOFFSET(vop_pathconf
), &a
));
916 struct vop_advlock_args
{
917 struct vnodeop_desc
*a_desc
;
924 extern struct vnodeop_desc vop_advlock_desc
;
925 #define VOP_ADVLOCK(vp, id, op, fl, flags) _VOP_ADVLOCK(vp, id, op, fl, flags)
926 static __inline
int _VOP_ADVLOCK(struct vnode
*vp
, caddr_t id
, int op
, struct flock
*fl
, int flags
)
928 struct vop_advlock_args a
;
929 a
.a_desc
= VDESC(vop_advlock
);
935 return (VCALL(vp
, VOFFSET(vop_advlock
), &a
));
938 struct vop_blkatoff_args
{
939 struct vnodeop_desc
*a_desc
;
945 extern struct vnodeop_desc vop_blkatoff_desc
;
946 #define VOP_BLKATOFF(vp, offset, res, bpp) _VOP_BLKATOFF(vp, offset, res, bpp)
947 static __inline
int _VOP_BLKATOFF(struct vnode
*vp
, off_t offset
, char **res
, struct buf
**bpp
)
949 struct vop_blkatoff_args a
;
950 a
.a_desc
= VDESC(vop_blkatoff
);
955 return (VCALL(vp
, VOFFSET(vop_blkatoff
), &a
));
958 struct vop_valloc_args
{
959 struct vnodeop_desc
*a_desc
;
962 struct ucred
*a_cred
;
963 struct vnode
**a_vpp
;
965 extern struct vnodeop_desc vop_valloc_desc
;
966 #define VOP_VALLOC(pvp, mode, cred, vpp) _VOP_VALLOC(pvp, mode, cred, vpp)
967 static __inline
int _VOP_VALLOC(struct vnode
*pvp
, int mode
, struct ucred
*cred
, struct vnode
**vpp
)
969 struct vop_valloc_args a
;
970 a
.a_desc
= VDESC(vop_valloc
);
975 return (VCALL(pvp
, VOFFSET(vop_valloc
), &a
));
978 struct vop_reallocblks_args
{
979 struct vnodeop_desc
*a_desc
;
981 struct cluster_save
*a_buflist
;
983 extern struct vnodeop_desc vop_reallocblks_desc
;
984 #define VOP_REALLOCBLKS(vp, buflist) _VOP_REALLOCBLKS(vp, buflist)
985 static __inline
int _VOP_REALLOCBLKS(struct vnode
*vp
, struct cluster_save
*buflist
)
987 struct vop_reallocblks_args a
;
988 a
.a_desc
= VDESC(vop_reallocblks
);
990 a
.a_buflist
= buflist
;
991 return (VCALL(vp
, VOFFSET(vop_reallocblks
), &a
));
994 struct vop_vfree_args
{
995 struct vnodeop_desc
*a_desc
;
1000 extern struct vnodeop_desc vop_vfree_desc
;
1001 #define VOP_VFREE(pvp, ino, mode) _VOP_VFREE(pvp, ino, mode)
1002 static __inline
int _VOP_VFREE(struct vnode
*pvp
, ino_t ino
, int mode
)
1004 struct vop_vfree_args a
;
1005 a
.a_desc
= VDESC(vop_vfree
);
1009 return (VCALL(pvp
, VOFFSET(vop_vfree
), &a
));
1012 struct vop_truncate_args
{
1013 struct vnodeop_desc
*a_desc
;
1017 struct ucred
*a_cred
;
1020 extern struct vnodeop_desc vop_truncate_desc
;
1021 #define VOP_TRUNCATE(vp, length, flags, cred, p) _VOP_TRUNCATE(vp, length, flags, cred, p)
1022 static __inline
int _VOP_TRUNCATE(struct vnode
*vp
, off_t length
, int flags
, struct ucred
*cred
, struct proc
*p
)
1024 struct vop_truncate_args a
;
1025 a
.a_desc
= VDESC(vop_truncate
);
1027 a
.a_length
= length
;
1033 extern int ubc_hold(struct vnode
*vp
);
1034 extern void ubc_rele(struct vnode
*vp
);
1035 int _didhold
= ubc_hold(vp
);
1036 _err
= VCALL(vp
, VOFFSET(vop_truncate
), &a
);
1043 struct vop_allocate_args
{
1044 struct vnodeop_desc
*a_desc
;
1048 off_t
*a_bytesallocated
;
1050 struct ucred
*a_cred
;
1053 extern struct vnodeop_desc vop_allocate_desc
;
1054 #define VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p) _VOP_ALLOCATE(vp, length, flags, bytesallocated, offset, cred, p)
1055 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
)
1057 struct vop_allocate_args a
;
1058 a
.a_desc
= VDESC(vop_allocate
);
1060 a
.a_length
= length
;
1062 a
.a_bytesallocated
= bytesallocated
;
1063 a
.a_offset
= offset
;
1066 return (VCALL(vp
, VOFFSET(vop_allocate
), &a
));
1069 struct vop_update_args
{
1070 struct vnodeop_desc
*a_desc
;
1072 struct timeval
*a_access
;
1073 struct timeval
*a_modify
;
1076 extern struct vnodeop_desc vop_update_desc
;
1077 #define VOP_UPDATE(vp, access, modify, waitfor) _VOP_UPDATE(vp, access, modify, waitfor)
1078 static __inline
int _VOP_UPDATE(struct vnode
*vp
, struct timeval
*access
, struct timeval
*modify
, int waitfor
)
1080 struct vop_update_args a
;
1081 a
.a_desc
= VDESC(vop_update
);
1083 a
.a_access
= access
;
1084 a
.a_modify
= modify
;
1085 a
.a_waitfor
= waitfor
;
1086 return (VCALL(vp
, VOFFSET(vop_update
), &a
));
1089 struct vop_pgrd_args
{
1090 struct vnodeop_desc
*a_desc
;
1093 struct ucred
*a_cred
;
1095 extern struct vnodeop_desc vop_pgrd_desc
;
1096 #define VOP_PGRD(vp, uio, cred) _VOP_PGRD(vp, uio, cred)
1097 static __inline
int _VOP_PGRD(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
)
1099 struct vop_pgrd_args a
;
1100 a
.a_desc
= VDESC(vop_pgrd
);
1104 return (VCALL(vp
, VOFFSET(vop_pgrd
), &a
));
1107 struct vop_pgwr_args
{
1108 struct vnodeop_desc
*a_desc
;
1111 struct ucred
*a_cred
;
1112 vm_offset_t a_offset
;
1114 extern struct vnodeop_desc vop_pgwr_desc
;
1115 #define VOP_PGWR(vp, uio, cred, offset) _VOP_PGWR(vp, uio, cred, offset)
1116 static __inline
int _VOP_PGWR(struct vnode
*vp
, struct uio
*uio
, struct ucred
*cred
, vm_offset_t offset
)
1118 struct vop_pgwr_args a
;
1119 a
.a_desc
= VDESC(vop_pgwr
);
1123 a
.a_offset
= offset
;
1124 return (VCALL(vp
, VOFFSET(vop_pgwr
), &a
));
1127 struct vop_pagein_args
{
1128 struct vnodeop_desc
*a_desc
;
1131 vm_offset_t a_pl_offset
;
1134 struct ucred
*a_cred
;
1137 extern struct vnodeop_desc vop_pagein_desc
;
1138 #define VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEIN(vp, pl, pl_offset, f_offset, size, cred, flags)
1139 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
)
1141 struct vop_pagein_args a
;
1142 a
.a_desc
= VDESC(vop_pagein
);
1145 a
.a_pl_offset
= pl_offset
;
1146 a
.a_f_offset
= f_offset
;
1150 return (VCALL(vp
, VOFFSET(vop_pagein
), &a
));
1153 struct vop_pageout_args
{
1154 struct vnodeop_desc
*a_desc
;
1157 vm_offset_t a_pl_offset
;
1160 struct ucred
*a_cred
;
1163 extern struct vnodeop_desc vop_pageout_desc
;
1164 #define VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags) _VOP_PAGEOUT(vp, pl, pl_offset, f_offset, size, cred, flags)
1165 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
)
1167 struct vop_pageout_args a
;
1168 a
.a_desc
= VDESC(vop_pageout
);
1171 a
.a_pl_offset
= pl_offset
;
1172 a
.a_f_offset
= f_offset
;
1176 return (VCALL(vp
, VOFFSET(vop_pageout
), &a
));
1179 struct vop_devblocksize_args
{
1180 struct vnodeop_desc
*a_desc
;
1182 register_t
*a_retval
;
1184 extern struct vnodeop_desc vop_devblocksize_desc
;
1185 #define VOP_DEVBLOCKSIZE(vp, retval) _VOP_DEVBLOCKSIZE(vp, retval)
1186 static __inline
int _VOP_DEVBLOCKSIZE(struct vnode
*vp
, register_t
*retval
)
1188 struct vop_devblocksize_args a
;
1189 a
.a_desc
= VDESC(vop_devblocksize
);
1191 a
.a_retval
= retval
;
1192 return (VCALL(vp
, VOFFSET(vop_devblocksize
), &a
));
1195 struct vop_searchfs_args
{
1196 struct vnodeop_desc
*a_desc
;
1198 void *a_searchparams1
;
1199 void *a_searchparams2
;
1200 struct attrlist
*a_searchattrs
;
1201 u_long a_maxmatches
;
1202 struct timeval
*a_timelimit
;
1203 struct attrlist
*a_returnattrs
;
1204 u_long
*a_nummatches
;
1205 u_long a_scriptcode
;
1208 struct searchstate
*a_searchstate
;
1210 extern struct vnodeop_desc vop_searchfs_desc
;
1211 #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)
1212 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
)
1214 struct vop_searchfs_args a
;
1215 a
.a_desc
= VDESC(vop_searchfs
);
1217 a
.a_searchparams1
= searchparams1
;
1218 a
.a_searchparams2
= searchparams2
;
1219 a
.a_searchattrs
= searchattrs
;
1220 a
.a_maxmatches
= maxmatches
;
1221 a
.a_timelimit
= timelimit
;
1222 a
.a_returnattrs
= returnattrs
;
1223 a
.a_nummatches
= nummatches
;
1224 a
.a_scriptcode
= scriptcode
;
1225 a
.a_options
= options
;
1227 a
.a_searchstate
= searchstate
;
1228 return (VCALL(vp
, VOFFSET(vop_searchfs
), &a
));
1231 struct vop_copyfile_args
{
1232 struct vnodeop_desc
*a_desc
;
1233 struct vnode
*a_fvp
;
1234 struct vnode
*a_tdvp
;
1235 struct vnode
*a_tvp
;
1236 struct componentname
*a_tcnp
;
1240 extern struct vnodeop_desc vop_copyfile_desc
;
1241 #define VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags) _VOP_COPYFILE(fvp, tdvp, tvp, tcnp, mode, flags)
1242 static __inline
int _VOP_COPYFILE(struct vnode
*fvp
, struct vnode
*tdvp
, struct vnode
*tvp
, struct componentname
*tcnp
, int mode
, int flags
)
1244 struct vop_copyfile_args a
;
1245 a
.a_desc
= VDESC(vop_copyfile
);
1252 return (VCALL(fvp
, VOFFSET(vop_copyfile
), &a
));
1255 struct vop_blktooff_args
{
1256 struct vnodeop_desc
*a_desc
;
1261 extern struct vnodeop_desc vop_blktooff_desc
;
1262 #define VOP_BLKTOOFF(vp, lblkno, offset) _VOP_BLKTOOFF(vp, lblkno, offset)
1263 static __inline
int _VOP_BLKTOOFF(struct vnode
*vp
, daddr_t lblkno
, off_t
*offset
)
1265 struct vop_blktooff_args a
;
1266 a
.a_desc
= VDESC(vop_blktooff
);
1268 a
.a_lblkno
= lblkno
;
1269 a
.a_offset
= offset
;
1270 return (VCALL(vp
, VOFFSET(vop_blktooff
), &a
));
1273 struct vop_offtoblk_args
{
1274 struct vnodeop_desc
*a_desc
;
1279 extern struct vnodeop_desc vop_offtoblk_desc
;
1280 #define VOP_OFFTOBLK(vp, offset, lblkno) _VOP_OFFTOBLK(vp, offset, lblkno)
1281 static __inline
int _VOP_OFFTOBLK(struct vnode
*vp
, off_t offset
, daddr_t
*lblkno
)
1283 struct vop_offtoblk_args a
;
1284 a
.a_desc
= VDESC(vop_offtoblk
);
1286 a
.a_offset
= offset
;
1287 a
.a_lblkno
= lblkno
;
1288 return (VCALL(vp
, VOFFSET(vop_offtoblk
), &a
));
1291 struct vop_cmap_args
{
1292 struct vnodeop_desc
*a_desc
;
1300 extern struct vnodeop_desc vop_cmap_desc
;
1301 #define VOP_CMAP(vp, foffset, size, bpn, run, poff) _VOP_CMAP(vp, foffset, size, bpn, run, poff)
1302 static __inline
int _VOP_CMAP(struct vnode
*vp
, off_t foffset
, size_t size
, daddr_t
*bpn
, size_t *run
, void *poff
)
1304 struct vop_cmap_args a
;
1305 a
.a_desc
= VDESC(vop_cmap
);
1307 a
.a_foffset
= foffset
;
1312 return (VCALL(vp
, VOFFSET(vop_cmap
), &a
));
1315 /* Special cases: */
1316 #include <sys/buf.h>
1319 struct vop_strategy_args
{
1320 struct vnodeop_desc
*a_desc
;
1323 extern struct vnodeop_desc vop_strategy_desc
;
1324 #define VOP_STRATEGY(bp) _VOP_STRATEGY(bp)
1325 static __inline
int _VOP_STRATEGY(struct buf
*bp
)
1327 struct vop_strategy_args a
;
1328 a
.a_desc
= VDESC(vop_strategy
);
1330 return (VCALL(bp
->b_vp
, VOFFSET(vop_strategy
), &a
));
1333 struct vop_bwrite_args
{
1334 struct vnodeop_desc
*a_desc
;
1337 extern struct vnodeop_desc vop_bwrite_desc
;
1338 #define VOP_BWRITE(bp) _VOP_BWRITE(bp)
1339 static __inline
int _VOP_BWRITE(struct buf
*bp
)
1341 struct vop_bwrite_args a
;
1342 a
.a_desc
= VDESC(vop_bwrite
);
1344 return (VCALL(bp
->b_vp
, VOFFSET(vop_bwrite
), &a
));
1347 /* End of special cases. */
1349 #endif /* __APPLE_API_UNSTABLE */
1350 #endif /* !_SYS_VNODE_IF_H_ */