From: Shawn O. Pearce Date: Sun, 24 Dec 2006 05:45:47 +0000 (-0500) Subject: Switch git_mmap to use pread. X-Git-Tag: v1.5.0-rc0~16 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/8e554429e8a9dbb5dba6b8aeca66fc27c0bb5538?hp=8e554429e8a9dbb5dba6b8aeca66fc27c0bb5538 Switch git_mmap to use pread. 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 Signed-off-by: Junio C Hamano ---