sendfile in FreeBSD 2.2

Yaoping Ruan yruan at cs.princeton.edu
Wed May 21 12:45:28 PDT 2003


Hi,
VOP_GETVOBJECT() macro is created by kern/vnode_if.pl and vnode_if.src. By running them you should be able to get vnode_if.c and vnode_if.h file. In vnode_if.h, you will get the macro defined as follow: (From FreeBsd 4.6)

static __inline int VOP_GETVOBJECT __P((
        struct vnode *vp,
        struct vm_object **objpp));
static __inline int VOP_GETVOBJECT(vp, objpp)
        struct vnode *vp;
        struct vm_object **objpp;
{
        struct vop_getvobject_args a;
        int rc;
        a.a_desc = VDESC(vop_getvobject);
        a.a_vp = vp;
        a.a_objpp = objpp;
        rc = VCALL(vp, VOFFSET(vop_getvobject), &a);
        return (rc);
}

Hope this helps.

- Yaoping


> Message: 19
> Date: Wed, 21 May 2003 09:32:26 -0700
> From: <Vijay.Singh at nokia.com>
> Subject: sendfile in FreeBSD 2.2
> To: <freebsd-hackers at freebsd.org>
> Message-ID:
>
> Hello. Would it be possible to port the sendfile system call to a FreeBSD 2.2 based system? Has anyone done this? I am trying to port the code from a later FreeBSD release and I have been unable to find out what the VOP_GETVOBJECT() macro does and how/what should it be replaced with for my case. Any help is appreciated.
>
> Thanks
> vijay



More information about the freebsd-hackers mailing list