From 02b0ce2b432d3e37769c0f46d315a91c83a0db77 Mon Sep 17 00:00:00 2001 From: Aditya Mandaleeka Date: Tue, 16 Jun 2015 15:25:20 -0700 Subject: Implement GC Suspension for Unix --- src/vm/threads.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/vm/threads.cpp') diff --git a/src/vm/threads.cpp b/src/vm/threads.cpp index 87ad9bc1f2..c4ce243e4f 100644 --- a/src/vm/threads.cpp +++ b/src/vm/threads.cpp @@ -2018,9 +2018,12 @@ Thread::Thread() m_pCurrentStackGuard = NULL; #endif -#ifdef FEATURE_HIJACK +#if defined(FEATURE_HIJACK) || defined(FEATURE_UNIX_GC_REDIRECT_HIJACK) m_ppvHJRetAddrPtr = (VOID**) 0xCCCCCCCCCCCCCCCC; m_pvHJRetAddr = (VOID*) 0xCCCCCCCCCCCCCCCC; +#endif // FEATURE_HIJACK || FEATURE_UNIX_GC_REDIRECT_HIJACK + +#ifdef FEATURE_HIJACK X86_ONLY(m_LastRedirectIP = 0); X86_ONLY(m_SpinCount = 0); #endif // FEATURE_HIJACK @@ -8243,9 +8246,9 @@ void CommonTripThread() if (thread->CatchAtSafePoint()) { _ASSERTE(!ThreadStore::HoldingThreadStore(thread)); -#ifdef FEATURE_HIJACK +#if defined(FEATURE_HIJACK) || defined(FEATURE_UNIX_GC_REDIRECT_HIJACK) thread->UnhijackThread(); -#endif // FEATURE_HIJACK +#endif // FEATURE_HIJACK || FEATURE_UNIX_GC_REDIRECT_HIJACK // Trap thread->PulseGCMode(); @@ -11240,7 +11243,7 @@ void Thread::AddFiberInfo(DWORD type) pInfo->timeStamp = getTimeStamp(); pInfo->threadID = GetCurrentThreadId(); -#ifdef FEATURE_HIJACK +#if defined(FEATURE_HIJACK) || defined(FEATURE_UNIX_GC_REDIRECT_HIJACK) // We can't crawl the stack of a thread that currently has a hijack pending // (since the hijack routine won't be recognized by any code manager). So we // undo any hijack, the EE will re-attempt it later. -- cgit v1.2.3