using System.Runtime.InteropServices;
using Microsoft.Win32.SafeHandles;
-internal static partial class Interop
+internal partial class Interop
{
- internal static partial class Kernel32
+ internal partial class Kernel32
{
- [DllImport(Interop.Libraries.Kernel32, ExactSpelling = true, SetLastError = true, EntryPoint = "WaitForSingleObject")]
- public static extern int WaitForSingleObject(SafeWaitHandle handle, int timeout);
+ [DllImport(Libraries.Kernel32, ExactSpelling=true, SetLastError=true, EntryPoint="WaitForSingleObject")]
+ internal static extern int WaitForSingleObject(SafeWaitHandle handle, int timeout);
}
}
+++ /dev/null
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-using System;
-using System.Runtime.InteropServices;
-using Microsoft.Win32.SafeHandles;
-
-internal partial class Interop
-{
- internal partial class Kernel32
- {
- [DllImport(Libraries.Kernel32, ExactSpelling=true, SetLastError=true, EntryPoint="WaitForSingleObject")]
- internal static extern int WaitForSingleObjectDontCallThis(SafeWaitHandle handle, int timeout);
- }
-}
// Holding a mutex requires us to keep thread affinity and announce ourselves as a critical region.
Thread.BeginCriticalRegion();
Thread.BeginThreadAffinity();
- int result = Interop.Kernel32.WaitForSingleObjectDontCallThis(mutexIn.SafeWaitHandle, 500);
+ int result = Interop.Kernel32.WaitForSingleObject(mutexIn.SafeWaitHandle, 500);
switch (result)
{