Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Jun 2003 23:48:43 -0700
From:      Terry Lambert <tlambert2@mindspring.com>
To:        Vijay.Singh@nokia.com
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: sendfile in FreeBSD 2.2
Message-ID:  <3EDC44CB.26675FAF@mindspring.com>
References:  <4D7B558499107545BB45044C63822DDE02C08E7B@mvebe001.americas.nokia.com>

next in thread | previous in thread | raw e-mail | index | archive | help


Vijay.Singh@nokia.com wrote:
> 
> Hi, I am following up my own post. I have been able to do most
> of the porting, but I have one question. What do I replace the
> OFF_TO_IDX() macro with? I could start with code that always
> passes the offset as 0 (sending the complete file). Any help
> would be appreciated.

See vm/vm_object.h in a more recent set of sources.  Basically,
all it does is, given a file offset, return a page index by
dividing by the page size (shifting rught PAGE_SHIFT worth of
bits).

-- Terry



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3EDC44CB.26675FAF>