[System.Core] Implement MemoryMappedFile.OpenExisting
authorMarius Ungureanu <marius.ungureanu@xamarin.com>
Sat, 24 Jun 2017 18:48:17 +0000 (21:48 +0300)
committerMarek Safar <marek.safar@gmail.com>
Mon, 26 Jun 2017 14:57:31 +0000 (16:57 +0200)
commitfd185fb454a5fd8d3f44559000d3605691e8b5c2
treeccd8cb12a4d4d1ab645b51c894b62403623544fa
parenta8c53ebf16fbe68787ce580bcb6141926db904a6
[System.Core] Implement MemoryMappedFile.OpenExisting

Reuse the existing icall infrastructure to give the same handle back.

This PR implements all OpenExisting methods (with the access rights parameter discarded) and the SafeHandle property.
In the runtime, we don't check the capacity parameter if we try to open a mmap file, and we fallthrough the handle refcount case.
mcs/class/System.Core/System.IO.MemoryMappedFiles/MemoryMappedFile.cs
mcs/class/System.Core/Test/System.IO.MemoryMappedFiles/MemoryMappedFileTest.cs
mono/metadata/file-mmap-posix.c
mono/metadata/file-mmap-windows.c