From 38034a26ff4e40e98d1af32abe5baef2c3eeea52 Mon Sep 17 00:00:00 2001 From: Jan Kotas Date: Thu, 15 Oct 2015 07:14:05 -0700 Subject: Cleanup GC-EE Interface - Add proper abstractions for threading methods to GCToEEInterface - Split sample gcenv into multiple files to avoid redundant content - Add handle table methods needed by .NET Native WinRT implementation Part of #1550 --- src/vm/gcenv.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'src/vm/gcenv.h') diff --git a/src/vm/gcenv.h b/src/vm/gcenv.h index fc5ca6de86..5816d0259e 100644 --- a/src/vm/gcenv.h +++ b/src/vm/gcenv.h @@ -99,10 +99,38 @@ public: // post-gc callback. static void GcDone(int condemned); + // Promote refcounted handle callback + static bool RefCountedHandleCallbacks(Object * pObject); + // Sync block cache management static void SyncBlockCacheWeakPtrScan(HANDLESCANPROC scanProc, LPARAM lp1, LPARAM lp2); static void SyncBlockCacheDemote(int max_gen); static void SyncBlockCachePromotionsGranted(int max_gen); + + // Thread functions + static bool IsPreemptiveGCDisabled(Thread * pThread) + { + WRAPPER_NO_CONTRACT; + return !!pThread->PreemptiveGCDisabled(); + } + + static void EnablePreemptiveGC(Thread * pThread) + { + WRAPPER_NO_CONTRACT; + pThread->EnablePreemptiveGC(); + } + + static void DisablePreemptiveGC(Thread * pThread) + { + WRAPPER_NO_CONTRACT; + pThread->DisablePreemptiveGC(); + } + + static void SetGCSpecial(Thread * pThread); + static alloc_context * GetAllocContext(Thread * pThread); + static bool CatchAtSafePoint(Thread * pThread); + + static Thread * GetThreadList(Thread * pThread); }; #endif // GCENV_H_ \ No newline at end of file -- cgit v1.2.3