You've already forked linux-packaging-mono
Imported Upstream version 5.14.0.78
Former-commit-id: 3494343bcc9ddb42b36b82dd9ae7b69e85e0229f
This commit is contained in:
parent
74b74abd9f
commit
19234507ba
@@ -25,10 +25,21 @@ namespace System.Runtime {
|
||||
using System.Runtime.Versioning;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
#if FEATURE_MULTICOREJIT
|
||||
#if FEATURE_MULTICOREJIT || MONO
|
||||
|
||||
public static class ProfileOptimization
|
||||
{
|
||||
#if MONO
|
||||
internal static void InternalSetProfileRoot(string directoryPath)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
|
||||
internal static void InternalStartProfile(string profile, IntPtr ptrNativeAssemblyLoadContext)
|
||||
{
|
||||
// ignore
|
||||
}
|
||||
#else
|
||||
[DllImport(JitHelpers.QCall, CharSet = CharSet.Unicode)]
|
||||
[SecurityCritical]
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
@@ -40,6 +51,7 @@ namespace System.Runtime {
|
||||
[ResourceExposure(ResourceScope.None)]
|
||||
[SuppressUnmanagedCodeSecurity]
|
||||
internal static extern void InternalStartProfile(string profile, IntPtr ptrNativeAssemblyLoadContext);
|
||||
#endif
|
||||
|
||||
[SecurityCritical]
|
||||
public static void SetProfileRoot(string directoryPath)
|
||||
|
||||
@@ -245,7 +245,7 @@ namespace System.Runtime.CompilerServices
|
||||
}
|
||||
|
||||
// This property lazily instantiates the Task in a non-thread-safe manner.
|
||||
private Task Task
|
||||
internal Task Task
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
@@ -153,7 +153,7 @@ namespace System.Runtime.CompilerServices
|
||||
task.NotifyDebuggerOfWaitCompletionIfNecessary();
|
||||
|
||||
// And throw an exception if the task is faulted or canceled.
|
||||
if (!task.IsRanToCompletion) ThrowForNonSuccess(task);
|
||||
if (!task.IsCompletedSuccessfully) ThrowForNonSuccess(task);
|
||||
}
|
||||
|
||||
/// <summary>Throws an exception to handle a task that completed in a state other than RanToCompletion.</summary>
|
||||
@@ -209,18 +209,18 @@ namespace System.Runtime.CompilerServices
|
||||
internal static void OnCompletedInternal(Task task, Action continuation, bool continueOnCapturedContext, bool flowExecutionContext)
|
||||
{
|
||||
if (continuation == null) throw new ArgumentNullException("continuation");
|
||||
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
|
||||
#if !MONO
|
||||
StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
|
||||
// If TaskWait* ETW events are enabled, trace a beginning event for this await
|
||||
// and set up an ending event to be traced when the asynchronous await completes.
|
||||
if ( TplEtwProvider.Log.IsEnabled() || Task.s_asyncDebuggingEnabled)
|
||||
{
|
||||
continuation = OutputWaitEtwEvents(task, continuation);
|
||||
}
|
||||
#endif
|
||||
|
||||
// Set the continuation onto the awaited task.
|
||||
task.SetContinuationForAwait(continuation, continueOnCapturedContext, flowExecutionContext, ref stackMark);
|
||||
#else
|
||||
task.SetContinuationForAwait(continuation, continueOnCapturedContext, flowExecutionContext);
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user