Imported Upstream version 6.0.0.172

Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2019-04-12 14:10:50 +00:00
parent 8016999e4d
commit 64ac736ec5
32155 changed files with 3981439 additions and 75368 deletions

View File

@ -41,17 +41,30 @@ namespace System.Threading
[ComVisible (true)]
public sealed class Mutex : WaitHandle
{
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private unsafe static extern IntPtr CreateMutex_icall (bool initiallyOwned, char *name,
int name_length, out bool created);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private unsafe static extern IntPtr OpenMutex_icall (char *name, int name_length,
MutexRights rights, out MonoIOError error);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern bool ReleaseMutex_internal(IntPtr handle);
[MethodImplAttribute(MethodImplOptions.InternalCall)]
private static extern IntPtr CreateMutex_internal(
bool initiallyOwned,
string name,
out bool created);
private unsafe static IntPtr CreateMutex_internal (bool initiallyOwned,
string name, out bool created)
{
fixed (char *fixed_name = name)
return CreateMutex_icall (initiallyOwned, fixed_name,
name?.Length ?? 0, out created);
}
[MethodImplAttribute (MethodImplOptions.InternalCall)]
private static extern IntPtr OpenMutex_internal (string name, MutexRights rights, out MonoIOError error);
private unsafe static IntPtr OpenMutex_internal (string name, MutexRights rights, out MonoIOError error)
{
fixed (char *fixed_name = name)
return OpenMutex_icall (fixed_name, name?.Length ?? 0, rights, out error);
}
private Mutex (IntPtr handle)
{