There's sendfile manpage in new netman package managed by Andi Kleen. They can
be found on ftp.muc.de/people/ak/
> Do I need to use glibc to use sendfile()?
No, you can call it via syscall4 macro:
#include <asm/types.h>
#include <asm/unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
int main(void) {
int fdo=0,fdi=0;
int size=0;
off_t offset=0;
int retval;
...
retval=sendfile(fdo,fdi,&offset,size);
...
}
_syscall4(ssize_t,sendfile,int,fdo,int,fdi,off_t,off,size_t,size);
BTW has anynone tried to actually use sendfile() in real world? I.e. in
Apache or other daemons that tend to transfer big amounts of data.
-- Pawel Krawczyk, CETI internet, Krakow. http://www.ceti.com.pl/- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/