Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2017-12-10 16:11:41 +0300
committerCorinna Vinschen <corinna@vinschen.de>2017-12-10 16:14:28 +0300
commit0c201166f5e8bf17ce9620867d2d35a4a63e47de (patch)
tree89c94fe938dc9fdbcf096f28d9ce60f4c9cce12b
parent67a657cb1d41e6ae90e9fdeba9e69fff09a2ea06 (diff)
cygwin: mmap: fix comment and formatting, drop unused code
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
-rw-r--r--winsup/cygwin/mmap.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index d4eddfcb4..d7d480fda 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -1177,12 +1177,9 @@ go_ahead:
protection as the file's pages, then as much pages as necessary
to accomodate the requested length, but as reserved pages which
raise a SIGBUS when trying to access them. AT_ROUND_TO_PAGE
- and page protection on shared pages is only supported by 32 bit NT,
- so don't even try on WOW64. This is accomplished by not setting
- orig_len on WOW64 above. */
-#if 0
- orig_len = roundup2 (orig_len, pagesize);
-#endif
+ and page protection on shared pages is only supported by the
+ 32 bit environment, so don't even try on 64 bit or even WOW64.
+ This is accomplished by not setting orig_len on 64 bit above. */
len = roundup2 (len, wincap.page_size ());
if (orig_len - len)
{
@@ -1465,7 +1462,7 @@ mlock (const void *addr, size_t len)
/* Align address and length values to page size. */
size_t pagesize = wincap.allocation_granularity ();
- PVOID base = (PVOID) rounddown((uintptr_t) addr, pagesize);
+ PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize);
SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len,
pagesize);
NTSTATUS status = 0;
@@ -1523,7 +1520,7 @@ munlock (const void *addr, size_t len)
/* Align address and length values to page size. */
size_t pagesize = wincap.allocation_granularity ();
- PVOID base = (PVOID) rounddown((uintptr_t) addr, pagesize);
+ PVOID base = (PVOID) rounddown ((uintptr_t) addr, pagesize);
SIZE_T size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len,
pagesize);
NTSTATUS status = NtUnlockVirtualMemory (NtCurrentProcess (), &base, &size,