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


> This patch (untested, given the unused nature of this #if block) uses 
> __getpagesize and fixes the race with use of __ffs.

That's fine.  I agree with your response to the issues raised about using
__ffs.

> 2013-07-01  Joseph Myers  <joseph@codesourcery.com>
> 
> 	* sysdeps/unix/sysv/linux/mmap64.c (__mmap64) [MMAP2_PAGE_SHIFT ==
> 	-1]: Use __getpagesize to determine page size.  Use __ffs to
> 	determine corresponding shift.

I don't like to see wrapping in the middle of a [...] like that.
I'd have written:

	* sysdeps/unix/sysv/linux/mmap64.c (__mmap64)
	[MMAP2_PAGE_SHIFT == -1]: Use __getpagesize to determine page size.
	Use __ffs to determine corresponding shift.


Thanks,
Roland


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