diff options
author | dotnet bot <dotnet-bot@microsoft.com> | 2016-04-16 03:28:38 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-04-16 03:28:38 +0300 |
commit | a4dc55611322fcf8d5d2c1f274155f8a08f3508c (patch) | |
tree | ab0e6b983e0d09834dd57e9da720a2b0cd42e5cf /src/Native/Runtime/thread.h | |
parent | d7c196e5d7b7e4aa01fe0a9afdf27f4ca5890791 (diff) |
MRT changes for portability (#1152)
- Replace asm wrappers for GC helpers with regular PInvoke for better portability. There is an extra GC mode switch now but it should not matter because of these helpers are either expensive or rarely used.
- Remove asm code for RhpBulkWriteBarrier by switching to C++ implementation unconditionally (remove CORERT ifdef)
- Move error handling for RhHandleAlloc* to System.Private.CoreLib (remove CORERT ifdef)
- Add missing error handling for RhReRegisterForFinalize
- A few other minor fixes and cleanup
[tfs-changeset: 1596653]
Diffstat (limited to 'src/Native/Runtime/thread.h')
-rw-r--r-- | src/Native/Runtime/thread.h | 38 |
1 files changed, 12 insertions, 26 deletions
diff --git a/src/Native/Runtime/thread.h b/src/Native/Runtime/thread.h index 99e416651..f989d25ab 100644 --- a/src/Native/Runtime/thread.h +++ b/src/Native/Runtime/thread.h @@ -71,7 +71,7 @@ struct ThreadBuffer #else PTR_VOID volatile m_pTransitionFrame; #endif - PTR_VOID m_pHackPInvokeTunnel; // see Thread::HackEnablePreemptiveMode + PTR_VOID m_pHackPInvokeTunnel; // see Thread::EnablePreemptiveMode PTR_VOID m_pCachedTransitionFrame; PTR_Thread m_pNext; // used by ThreadStore's SList<Thread> HANDLE m_hPalThread; // WARNING: this may legitimately be INVALID_HANDLE_VALUE @@ -144,18 +144,13 @@ private: // SyncState members // PTR_VOID GetTransitionFrame(); - // --------------------------------------------------------------------------------------------------- + + // // Synchronous state transitions -- these must occur on the thread whose state is changing // void LeaveRendezVous(void * pTransitionFrame); bool TryReturnRendezVous(void * pTransitionFrame); - // begin { // the set of operations used to support unmanaged code running in cooperative mode - void HackEnablePreemptiveMode(); - void HackDisablePreemptiveMode(); - // } end - // ------------------------------------------------------------------------------------------------------- - void GcScanRootsWorker(void * pfnEnumCallback, void * pvCallbackData, StackFrameIterator & sfIter); public: @@ -225,28 +220,19 @@ public: static bool IsHijackTarget(void * address); - // ------------------------------------------------------------------------------------------------------- - // LEGACY APIs: do not use except from GC itself // - bool PreemptiveGCDisabled(); - void EnablePreemptiveGC(); - void DisablePreemptiveGC(); - void PulseGCMode(); + // The set of operations used to support unmanaged code running in cooperative mode + // + void EnablePreemptiveMode(); + void DisablePreemptiveMode(); + void SetupHackPInvokeTunnel(); + + // + // GC support APIs - do not use except from GC itself + // void SetGCSpecial(bool isGCSpecial); bool IsGCSpecial(); bool CatchAtSafePoint(); - // END LEGACY APIs - // ------------------------------------------------------------------------------------------------------- - - // Nothing to do. - bool HaveExtraWorkForFinalizer() { return false; } - - // We have chosen not to eagerly commit thread stacks. - static bool CommitThreadStack(Thread* pThreadOptional) - { - UNREFERENCED_PARAMETER(pThreadOptional); - return true; - } bool TryFastReversePInvoke(ReversePInvokeFrame * pFrame); void ReversePInvoke(ReversePInvokeFrame * pFrame); |