From: Ludovic Henry Date: Fri, 3 Mar 2017 15:39:29 +0000 (-0500) Subject: [corert] Import System.Threading.ThreadPoolBoundHandle X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=b85e7c862b17520961a7e03d83600f3efe19adfe [corert] Import System.Threading.ThreadPoolBoundHandle --- diff --git a/external/corert b/external/corert index ba1a79e89b6..31eda261991 160000 --- a/external/corert +++ b/external/corert @@ -1 +1 @@ -Subproject commit ba1a79e89b65fe0c9ea10e3c58b3a49316cf8101 +Subproject commit 31eda261991f9f6c1add1686b6d3799f835b2978 diff --git a/mcs/class/corlib/corert/AddrofIntrinsics.cs b/mcs/class/corlib/corert/AddrofIntrinsics.cs new file mode 100644 index 00000000000..4f892fd1487 --- /dev/null +++ b/mcs/class/corlib/corert/AddrofIntrinsics.cs @@ -0,0 +1,14 @@ + +using System; + +namespace System.Runtime.InteropServices +{ + internal static class AddrofIntrinsics + { + // This method is implemented elsewhere in the toolchain + internal static IntPtr AddrOf(T ftn) + { + return Marshal.GetFunctionPointerForDelegate(ftn); + } + } +} \ No newline at end of file diff --git a/mcs/class/corlib/corert/Interop.MemAllocFree.cs b/mcs/class/corlib/corert/Interop.MemAllocFree.cs new file mode 100644 index 00000000000..a41282df4f7 --- /dev/null +++ b/mcs/class/corlib/corert/Interop.MemAllocFree.cs @@ -0,0 +1,21 @@ + +using System; + +internal static partial class Interop +{ + internal static IntPtr MemAlloc(UIntPtr sizeInBytes) + { + if (Environment.IsRunningOnWindows) + return Windows_MemAlloc(sizeInBytes); + else + return Unix_MemAlloc(sizeInBytes); + } + + internal static void MemFree(IntPtr allocatedMemory) + { + if (Environment.IsRunningOnWindows) + Windows_MemFree(allocatedMemory); + else + Unix_MemFree(allocatedMemory); + } +} diff --git a/mcs/class/corlib/corert/Interop.cs b/mcs/class/corlib/corert/Interop.cs new file mode 100644 index 00000000000..0944b5b1965 --- /dev/null +++ b/mcs/class/corlib/corert/Interop.cs @@ -0,0 +1,14 @@ + +using System; + +internal partial class Interop +{ + internal partial class mincore + { + static mincore() + { + if (!Environment.IsRunningOnWindows) + throw new PlatformNotSupportedException(); + } + } +} diff --git a/mcs/class/corlib/corlib.dll.sources b/mcs/class/corlib/corlib.dll.sources index aaa112e9142..59f60a88fb5 100644 --- a/mcs/class/corlib/corlib.dll.sources +++ b/mcs/class/corlib/corlib.dll.sources @@ -1637,22 +1637,49 @@ ReferenceSources/Type.cs ../referencesource/mscorlib/microsoft/win32/safehandles/safewaithandle.cs ../referencesource/mscorlib/microsoft/win32/safehandles/win32safehandles.cs +corert/AddrofIntrinsics.cs corert/Debug.cs +corert/Interop.cs +corert/Interop.MemAllocFree.cs + +../../../external/corert/src/Common/src/Interop/Unix/Interop.Libraries.cs + +../../../external/corert/src/Common/src/Interop/Unix/System.Private.CoreLib.Native/Interop.MemAllocFree.cs + +../../../external/corert/src/Common/src/Interop/Windows/Interop.Libraries.cs + +../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.Errors.cs +../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.FormatMessage.cs +../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.MemAllocFree.cs +../../../external/corert/src/Common/src/Interop/Windows/mincore/Interop.ThreadPoolIO.cs ../../../external/corert/src/Common/src/System/Diagnostics/Debug.cs ../../../external/corert/src/Common/src/System/Numerics/Hashing/HashHelpers.cs -../../../external/corert/src/System.Private.CoreLib/src/System/Collections/LowLevelComparer.cs -../../../external/corert/src/System.Private.CoreLib/src/System/Collections/ObjectEqualityComparer.cs +../../../external/corert/src/Runtime.Base/src/System/Runtime/InteropServices/NativeCallableAttribute.cs + +../../../external/corert/src/System.Private.CoreLib/src/Microsoft/Win32/SafeHandles/SafeThreadPoolIOHandle.cs ../../../external/corert/src/System.Private.CoreLib/src/System/Tuple.cs ../../../external/corert/src/System.Private.CoreLib/src/System/TupleExtensions.cs ../../../external/corert/src/System.Private.CoreLib/src/System/ValueTuple.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Collections/LowLevelComparer.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Collections/ObjectEqualityComparer.cs + +../../../external/corert/src/System.Private.CoreLib/src/System/IO/Win32Marshal.cs + ../../../external/corert/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/ITuple.cs ../../../external/corert/src/System.Private.CoreLib/src/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/DeferredDisposableLifetime.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolBoundHandle.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.ExecutionContextCallbackArgs.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolNativeOverlapped.OverlappedData.cs +../../../external/corert/src/System.Private.CoreLib/src/System/Threading/Win32ThreadPoolPreAllocatedOverlapped.cs + corefx/SR.cs ../../../external/corefx/src/System.Collections.Concurrent/src/System/Collections/Concurrent/CDSCollectionETWBCLProvider.cs