diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2011-12-05 19:46:26 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2011-12-05 19:46:26 +0400 |
commit | 8912b2e56ff4e0082d5f7810235ce759e93d9c25 (patch) | |
tree | 3219a369dc4cd7b5a7e5188bdfde51de71b2abb3 /winsup/cygwin/mmap.cc | |
parent | 536e00784ed9670493522cb6634625aa21c14f32 (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/mmap.cc')
-rw-r--r-- | winsup/cygwin/mmap.cc | 4 |
1 files changed, 2 insertions, 2 deletions
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 |