This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.18-9-g42c8fdd
- From: jsm28 at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 20 Aug 2013 16:44:31 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.18-9-g42c8fdd
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 42c8fdd8f1d3245a0abf957fc9f0a6eb35145643 (commit)
from b31469d0d40ac858687657c72baaafd7a63041d9 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=42c8fdd8f1d3245a0abf957fc9f0a6eb35145643
commit 42c8fdd8f1d3245a0abf957fc9f0a6eb35145643
Author: Joseph Myers <joseph@codesourcery.com>
Date: Tue Aug 20 16:43:59 2013 +0000
Use __getpagesize and __ffs in MMAP2_PAGE_SHIFT == -1 case of mmap64.
diff --git a/ChangeLog b/ChangeLog
index 0880ef7..d6eb8dc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,10 @@
2013-08-20 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.
+
+2013-08-20 Joseph Myers <joseph@codesourcery.com>
Roland McGrath <roland@hack.frob.com>
* Makefile (INSTALL): Remove trailing blank lines from output of
diff --git a/sysdeps/unix/sysv/linux/mmap64.c b/sysdeps/unix/sysv/linux/mmap64.c
index e2dcdc4..4ba686c 100644
--- a/sysdeps/unix/sysv/linux/mmap64.c
+++ b/sysdeps/unix/sysv/linux/mmap64.c
@@ -42,9 +42,8 @@ __mmap64 (void *addr, size_t len, int prot, int flags, int fd, off64_t offset)
#if MMAP2_PAGE_SHIFT == -1
if (page_shift == 0)
{
- int page_size = getpagesize ();
- while ((1 << ++page_shift) != page_size)
- ;
+ int page_size = __getpagesize ();
+ page_shift = __ffs (page_size) - 1;
}
#endif
if (offset & ((1 << page_shift) - 1))
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 6 ++++++
sysdeps/unix/sysv/linux/mmap64.c | 5 ++---
2 files changed, 8 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources