This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


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.)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]