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>2009-06-06 23:56:41 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-06-06 23:56:41 +0400
commitf985cc1c535516836e4bb323b0498255ce7a8b6b (patch)
treeb31b1a94c267ed859da4938874a668b01aca3630
parentc05f7ba26e312a7a0010b9400c16f2263db27313 (diff)
* mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
throughout for symmetry. (fhandler_dev_mem::munmap): Use correct process handle in call to NtUnmapViewOfSection.
-rw-r--r--winsup/cygwin/ChangeLog7
-rw-r--r--winsup/cygwin/mmap.cc10
2 files changed, 12 insertions, 5 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 478170ec5..e11466cbc 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,12 @@
2009-06-06 Corinna Vinschen <corinna@vinschen.de>
+ * mmap.cc: Use NtUnmapViewOfSection instead of UnmapViewOfFile
+ throughout for symmetry.
+ (fhandler_dev_mem::munmap): Use correct process handle in call to
+ NtUnmapViewOfSection.
+
+2009-06-06 Corinna Vinschen <corinna@vinschen.de>
+
* dll_init.h (struct dll): Set size of name element to ANYSIZE_ARRAY.
* dll_init.cc: Fix formatting.
(dll_list::alloc): Only allocate as much memory for struct dll as
diff --git a/winsup/cygwin/mmap.cc b/winsup/cygwin/mmap.cc
index 30410692f..799b3f701 100644
--- a/winsup/cygwin/mmap.cc
+++ b/winsup/cygwin/mmap.cc
@@ -1480,7 +1480,7 @@ fhandler_dev_zero::mmap (caddr_t *addr, size_t len, int prot,
__seterrno ();
else
{
- UnmapViewOfFile (base);
+ NtUnmapViewOfSection (GetCurrentProcess (), base);
set_errno (EINVAL);
debug_printf ("MapView: address shift with MAP_FIXED given");
}
@@ -1499,7 +1499,7 @@ fhandler_dev_zero::munmap (HANDLE h, caddr_t addr, size_t len)
VirtualFree (addr, 0, MEM_RELEASE);
else
{
- UnmapViewOfFile (addr);
+ NtUnmapViewOfSection (GetCurrentProcess (), addr);
NtClose (h);
}
return 0;
@@ -1560,7 +1560,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot,
__seterrno ();
else
{
- UnmapViewOfFile (base);
+ NtUnmapViewOfSection (GetCurrentProcess (), base);
set_errno (EINVAL);
debug_printf ("MapView: address shift with MAP_FIXED given");
}
@@ -1575,7 +1575,7 @@ fhandler_disk_file::mmap (caddr_t *addr, size_t len, int prot,
int
fhandler_disk_file::munmap (HANDLE h, caddr_t addr, size_t len)
{
- UnmapViewOfFile (addr);
+ NtUnmapViewOfSection (GetCurrentProcess (), addr);
NtClose (h);
return 0;
}
@@ -1673,7 +1673,7 @@ int
fhandler_dev_mem::munmap (HANDLE h, caddr_t addr, size_t len)
{
NTSTATUS ret;
- if (!NT_SUCCESS (ret = NtUnmapViewOfSection (INVALID_HANDLE_VALUE, addr)))
+ if (!NT_SUCCESS (ret = NtUnmapViewOfSection (GetCurrentProcess (), addr)))
{
__seterrno_from_nt_status (ret);
return -1;