sendfile in FreeBSD 2.2
Terry Lambert
tlambert2 at mindspring.com
Mon Jun 2 23:49:57 PDT 2003
Vijay.Singh at 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
More information about the freebsd-hackers
mailing list