You've already forked linux-packaging-mono
Imported Upstream version 6.0.0.172
Former-commit-id: f3cc9b82f3e5bd8f0fd3ebc098f789556b44e9cd
This commit is contained in:
parent
8016999e4d
commit
64ac736ec5
@ -35,17 +35,24 @@ using System;
|
||||
using System.Runtime.CompilerServices;
|
||||
using Microsoft.Win32.SafeHandles;
|
||||
|
||||
#if !MOBILE
|
||||
#if !MOBILE && !NETCORE
|
||||
using System.Security.AccessControl;
|
||||
using System.IO;
|
||||
#endif
|
||||
|
||||
namespace System.Threading
|
||||
namespace System.Threading
|
||||
{
|
||||
internal static class NativeEventCalls
|
||||
{
|
||||
public unsafe static IntPtr CreateEvent_internal (bool manual, bool initial, string name, out int errorCode)
|
||||
{
|
||||
// FIXME check for embedded nuls in name
|
||||
fixed (char *fixed_name = name)
|
||||
return CreateEvent_icall (manual, initial, fixed_name, name?.Length ?? 0, out errorCode);
|
||||
}
|
||||
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public static extern IntPtr CreateEvent_internal (bool manual, bool initial, string name, out int errorCode);
|
||||
private unsafe static extern IntPtr CreateEvent_icall (bool manual, bool initial, char *name, int name_length, out int errorCode);
|
||||
|
||||
public static bool SetEvent (SafeWaitHandle handle)
|
||||
{
|
||||
@ -80,9 +87,16 @@ namespace System.Threading
|
||||
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
||||
public static extern void CloseEvent_internal (IntPtr handle);
|
||||
|
||||
#if !MOBILE
|
||||
#if !MOBILE && !NETCORE
|
||||
public unsafe static IntPtr OpenEvent_internal (string name, EventWaitHandleRights rights, out int errorCode)
|
||||
{
|
||||
// FIXME check for embedded nuls in name
|
||||
fixed (char *fixed_name = name)
|
||||
return OpenEvent_icall (fixed_name, name?.Length ?? 0, rights, out errorCode);
|
||||
}
|
||||
|
||||
[MethodImplAttribute (MethodImplOptions.InternalCall)]
|
||||
public static extern IntPtr OpenEvent_internal (string name, EventWaitHandleRights rights, out int errorCode);
|
||||
private unsafe static extern IntPtr OpenEvent_icall (char *name, int name_length, EventWaitHandleRights rights, out int errorCode);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user