Re: [PATCH] Replacing the system call pread() with real mmap().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Sun, 7 Jan 2007, Stefan-W. Hahn wrote:

> Also sprach Shawn O. Pearce am Sun, 07 Jan 2007 at 06:24:45 -0500:
> > Better to emulate pread using lseek/xread/lseek:
> > 
> > 	off_t p = lseek(fd, offset, SEEK_SET);
> > 	xread(fd, buf, count);
> > 	lseek(fd, p, SEEK_SET);
> > 
> > If you look at the history for contrib/mmap.c you will see an
> > implementation like that before it was called git_mmap().
> 
> This doesn't work;I tried it before.

Care to elaborate? It worked pretty well on _all_ cygwin setups I tested 
with.

Ciao,
Dscho

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]