[corert] Import System.Threading.ThreadPoolBoundHandle
authorLudovic Henry <ludovic@xamarin.com>
Fri, 3 Mar 2017 15:39:29 +0000 (10:39 -0500)
committerLudovic Henry <ludovic@xamarin.com>
Sat, 4 Mar 2017 00:15:36 +0000 (19:15 -0500)
external/corert
mcs/class/corlib/corert/AddrofIntrinsics.cs [new file with mode: 0644]
mcs/class/corlib/corert/Interop.MemAllocFree.cs [new file with mode: 0644]
mcs/class/corlib/corert/Interop.cs [new file with mode: 0644]
mcs/class/corlib/corlib.dll.sources

index ba1a79e89b65fe0c9ea10e3c58b3a49316cf8101..31eda261991f9f6c1add1686b6d3799f835b2978 160000 (submodule)
@@ -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 (file)
index 0000000..4f892fd
--- /dev/null
@@ -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>(T ftn)
+               {
+                       return Marshal.GetFunctionPointerForDelegate<T>(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 (file)
index 0000000..a41282d
--- /dev/null
@@ -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 (file)
index 0000000..0944b5b
--- /dev/null
@@ -0,0 +1,14 @@
+
+using System;
+
+internal partial class Interop
+{
+       internal partial class mincore
+       {
+               static mincore()
+               {
+                       if (!Environment.IsRunningOnWindows)
+                               throw new PlatformNotSupportedException();
+               }
+       }
+}
index aaa112e914210eacf08e474850c4e28eb82fa3c1..59f60a88fb5cc55eac4c71194041ecdc3b9baa8b 100644 (file)
@@ -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