mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-17 11:21:39 -10:00
* [netcore] Implement MethodBody using internal Runtime* classes. Use the mono version for ModuleHandle. * [netcore] Reflection fixes. * Address review comments. * [netcore] Implement RuntimeHelpers:GetUninitializedObject (). * [netcore] Implement the Type::GetMethod () overload which has a genericParameterCount parameter. * [netcore] Implement Thread.OptimalMaxSpinWaitsPerSpinIteration. * Revert a change to fix a test failure. * [netcore] Implement Marshal:GetExceptionForHRInternal (). * [netcore] Implement GC:GetSegmentSize (). * [runtime] Allow pointer type members in typed references.
30 lines
941 B
C#
30 lines
941 B
C#
using System.Runtime.CompilerServices;
|
|
using System.Runtime.InteropServices;
|
|
|
|
namespace System.Threading
|
|
{
|
|
partial class WaitHandle
|
|
{
|
|
[MethodImplAttribute(MethodImplOptions.InternalCall)]
|
|
unsafe static extern int Wait_internal(IntPtr* handles, int numHandles, bool waitAll, int ms);
|
|
|
|
static int WaitOneCore (IntPtr waitHandle, int millisecondsTimeout)
|
|
{
|
|
unsafe {
|
|
return Wait_internal (&waitHandle, 1, false, millisecondsTimeout);
|
|
}
|
|
}
|
|
|
|
[MethodImpl (MethodImplOptions.InternalCall)]
|
|
static extern int SignalAndWaitCore (IntPtr waitHandleToSignal, IntPtr waitHandleToWaitOn, int millisecondsTimeout);
|
|
|
|
internal static int WaitMultipleIgnoringSyncContext (Span<IntPtr> waitHandles, bool waitAll, int millisecondsTimeout)
|
|
{
|
|
unsafe {
|
|
fixed (IntPtr* handles = &MemoryMarshal.GetReference (waitHandles)) {
|
|
return Wait_internal (handles, waitHandles.Length, waitAll, millisecondsTimeout);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |