summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2019-01-17 07:38:00 +0100
committerJan Kotas <jkotas@microsoft.com>2019-01-17 04:16:15 -0800
commit0f9253f952b9af4d274b7b69381e64ad77e5b3dc (patch)
tree27a63184d0747d2c5cc9a16a279098e4ca57deac
parentd5ee1cb9a2d4dc58d85ed9e59e1002f798234277 (diff)
downloadcoreclr-0f9253f952b9af4d274b7b69381e64ad77e5b3dc.tar.gz
coreclr-0f9253f952b9af4d274b7b69381e64ad77e5b3dc.tar.bz2
coreclr-0f9253f952b9af4d274b7b69381e64ad77e5b3dc.zip
Fix CoreCLR build of AsyncMethodBuilder.
-rw-r--r--src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
index 4277c00464..aa9d521840 100644
--- a/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
+++ b/src/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilder.cs
@@ -24,6 +24,10 @@ using Internal.Runtime.CompilerServices;
using Internal.Runtime.Augments;
using Internal.Threading.Tasks;
+#if !CORECLR
+using Thread = Internal.Runtime.Augments.RuntimeThread;
+#endif
+
namespace System.Runtime.CompilerServices
{
/// <summary>
@@ -562,12 +566,12 @@ namespace System.Runtime.CompilerServices
/// <summary>A delegate to the <see cref="MoveNext()"/> method.</summary>
public Action MoveNextAction => _moveNextAction ?? (_moveNextAction = new Action(MoveNext));
- internal sealed override void ExecuteFromThreadPool(RuntimeThread threadPoolThread) => MoveNext(threadPoolThread);
+ internal sealed override void ExecuteFromThreadPool(Thread threadPoolThread) => MoveNext(threadPoolThread);
/// <summary>Calls MoveNext on <see cref="StateMachine"/></summary>
public void MoveNext() => MoveNext(threadPoolThread: null);
- private void MoveNext(RuntimeThread threadPoolThread)
+ private void MoveNext(Thread threadPoolThread)
{
Debug.Assert(!IsCompleted);
@@ -983,8 +987,8 @@ namespace System.Runtime.CompilerServices
// enregistrer variables with 0 post-fix so they can be used in registers without EH forcing them to stack
// Capture references to Thread Contexts
- RuntimeThread currentThread0 = RuntimeThread.CurrentThread;
- RuntimeThread currentThread = currentThread0;
+ Thread currentThread0 = Thread.CurrentThread;
+ Thread currentThread = currentThread0;
ExecutionContext previousExecutionCtx0 = currentThread0.ExecutionContext;
// Store current ExecutionContext and SynchronizationContext as "previousXxx".
@@ -1001,7 +1005,7 @@ namespace System.Runtime.CompilerServices
{
// Re-enregistrer variables post EH with 1 post-fix so they can be used in registers rather than from stack
SynchronizationContext previousSyncCtx1 = previousSyncCtx;
- RuntimeThread currentThread1 = currentThread;
+ Thread currentThread1 = currentThread;
// The common case is that these have not changed, so avoid the cost of a write barrier if not needed.
if (previousSyncCtx1 != currentThread1.SynchronizationContext)
{