Thread (9 messages) flat view 9 messages, 4 authors, 2016-06-15

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

From: Stefan-W. Hahn <hidden>
Date: 2016-06-15 22:42:48

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.

Stefan
-- 
Stefan-W. Hahn                          It is easy to make things.
/ mailto:stefan.hahn@s-hahn.de /        It is hard to make things simple.			
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help