diff options
author | Jan Kotas <jkotas@microsoft.com> | 2016-05-17 01:02:38 +0300 |
---|---|---|
committer | Jan Kotas <jkotas@microsoft.com> | 2016-05-17 01:02:38 +0300 |
commit | 10d475ef6233e5baf6db91eb9edb5f426685298e (patch) | |
tree | 64ffe65ca9d0f751991056baf2cdb58a05123808 /src/Native/Runtime/thread.h | |
parent | a7e7db720420872e9814966a86144d41871364fc (diff) |
Reduce assembly code in PInvoke helpers
- Reduce amount of assembly code in PInvoke helpers by moving all slow paths to C++
- Share code between the slow paths of assembly and portable helpers
- Improve performance of the portable helpers by making the access to current thread and the trap thread statics inlineable (e.g. the portable RhpReversePInvoke2 helper has only two extra instructions compared to what the hand-optimized assembly helper would have)
[tfs-changeset: 1605153]
Diffstat (limited to 'src/Native/Runtime/thread.h')
-rw-r--r-- | src/Native/Runtime/thread.h | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/Native/Runtime/thread.h b/src/Native/Runtime/thread.h index f989d25ab..bd15d61a1 100644 --- a/src/Native/Runtime/thread.h +++ b/src/Native/Runtime/thread.h @@ -145,12 +145,6 @@ private: // PTR_VOID GetTransitionFrame(); - // - // Synchronous state transitions -- these must occur on the thread whose state is changing - // - void LeaveRendezVous(void * pTransitionFrame); - bool TryReturnRendezVous(void * pTransitionFrame); - void GcScanRootsWorker(void * pfnEnumCallback, void * pvCallbackData, StackFrameIterator & sfIter); public: @@ -234,9 +228,16 @@ public: bool IsGCSpecial(); bool CatchAtSafePoint(); - bool TryFastReversePInvoke(ReversePInvokeFrame * pFrame); - void ReversePInvoke(ReversePInvokeFrame * pFrame); - void ReversePInvokeReturn(ReversePInvokeFrame * pFrame); + // + // Managed/unmanaged interop transitions support APIs + // + void WaitForSuspend(); + void WaitForGC(void * pTransitionFrame); + + void ReversePInvokeAttachOrTrapThread(ReversePInvokeFrame * pFrame); + + bool InlineTryFastReversePInvoke(ReversePInvokeFrame * pFrame); + void InlineReversePInvokeReturn(ReversePInvokeFrame * pFrame); }; #ifndef GCENV_INCLUDED |