[Coop] Convert and cleanup open/create of named mutex/event/semaphore. (#12002)
commitad3a9fbba8d2fb81a1fb89a65e6d802a0c3737a5
authorJay Krell <jay.krell@cornell.edu>
Mon, 7 Jan 2019 15:51:10 +0000 (7 07:51 -0800)
committerAleksey Kliger (λgeek) <akliger@gmail.com>
Mon, 7 Jan 2019 15:51:10 +0000 (7 10:51 -0500)
treefadee6401d2b10e73ae90360c2753a0c2f6f142c
parent96259e2b306ee6f3d1f3a7e7987c56c754bd02e7
[Coop] Convert and cleanup open/create of named mutex/event/semaphore. (#12002)

* [Coop] Convert System.Threading.Semaphore.
Potential handles are avoided through fixed, but error path converting utf16 to utf8 is introduced.

* [Coop] Cleanup System.Threading.Mutex. Replace gchandle pinning with C# fixed.

* Remove two commented out lines that are not likely to materialize.

* [Coop] Cleanup System.Threading.NativeEventCalls. Replace gchandle with C# fixed.

* Don't assume ves_icall_System_Threading_Semaphore_ReleaseSemaphore_internal output is to stack.
15 files changed:
configure.ac
mcs/class/corlib/System.Threading/Mutex.cs
mcs/class/corlib/System.Threading/NativeEventCalls.cs
mcs/class/referencesource/System/sys/system/threading/semaphore.cs
mono/metadata/icall-def.h
mono/metadata/mono-security.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/w32event-unix.c
mono/metadata/w32event-win32.c
mono/metadata/w32mutex-unix.c
mono/metadata/w32mutex-win32.c
mono/metadata/w32semaphore-unix.c
mono/metadata/w32semaphore-win32.c
mono/metadata/w32semaphore.h