_IO_file_underflow_mmap read call for atime

Ulrich Drepper drepper@redhat.com
Wed Jul 31 15:58:00 GMT 2002


Roland McGrath wrote:

> If we assume that the mmap implementations we are using in fact also meet
> the stricter criterion of updating st_atime on each read fault, then it is
> safe to just use mmap and st_atime will meet the POSIX stdio rules.  I
> haven't experimented on Linux, but this is certainly how mmap behaves on
> GNU/Hurd.

The Linux code modifies atime when it's mapped.  So we'd need a symbol 
MMAP_ATIME_AT_ACCESS which is defined for Hurd but not for Linux.  The 
read call is only performed when the symbol is not defined.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------



More information about the Libc-hacker mailing list