Consistently use page_shift in sysdeps/unix/sysv/linux/mmap64.c

Roland McGrath roland@hack.frob.com
Fri Jun 28 22:14:00 GMT 2013


That's fine but if you're going to worry about the unused #if case then you
might make it name space clean (use __getpagesize or GLRO(dl_pagesize)) and
make it use __ffs instead of a loop for its log2.  (The latter is also a
correctness fix in case of a race to be the first call, in which case the
first thread could be partway through its loop when the second thread comes
along and uses a bogus nonzero value for page_shift.)



More information about the Libc-alpha mailing list