From 8912b2e56ff4e0082d5f7810235ce759e93d9c25 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 5 Dec 2011 15:46:26 +0000 Subject: * mmap.cc (mlock): Replace LOCK_VM_IN_WSL with correct MAP_PROCESS. (munlock): Ditto. * ntdll.h: Rearrange to have all preprocessor definitions at the start of the file. Add comments to each definition block. (MAP_PROCESS): Rename from LOCK_VM_IN_WSL. (MAP_SYSTEM): Rename from LOCK_VM_IN_RAM. --- winsup/cygwin/mmap.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/mmap.cc') diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc index 2bd72610f..6d75a9cea 100644 --- a/winsup/cygwin/mmap.cc +++ b/winsup/cygwin/mmap.cc @@ -1354,7 +1354,7 @@ mlock (const void *addr, size_t len) do { status = NtLockVirtualMemory (NtCurrentProcess (), &base, &size, - LOCK_VM_IN_WSL); + MAP_PROCESS); if (status == STATUS_WORKING_SET_QUOTA) { /* The working set is too small, try to increase it so that the @@ -1408,7 +1408,7 @@ munlock (const void *addr, size_t len) PVOID base = (PVOID) rounddown((uintptr_t) addr, pagesize); ULONG size = roundup2 (((uintptr_t) addr - (uintptr_t) base) + len, pagesize); NTSTATUS status = NtUnlockVirtualMemory (NtCurrentProcess (), &base, &size, - LOCK_VM_IN_WSL); + MAP_PROCESS); if (!NT_SUCCESS (status)) __seterrno_from_nt_status (status); else -- cgit v1.2.3