Switch git_mmap to use pread.
authorShawn O. Pearce <spearce@spearce.org>
Sun, 24 Dec 2006 05:45:47 +0000 (00:45 -0500)
committerJunio C Hamano <junkio@cox.net>
Sun, 24 Dec 2006 08:29:43 +0000 (00:29 -0800)
Now that Git depends on pread in index-pack its safe to say we can
also depend on it within the git_mmap emulation we activate when
NO_MMAP is set. On most systems pread should be slightly faster
than an lseek/read/lseek sequence as its one system call vs. three
system calls.

We also now honor EAGAIN and EINTR error codes from pread and
restart the prior read.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
No differences found