From e64cbb5c722ab9b7d93ca32445e17df1115be70c Mon Sep 17 00:00:00 2001 From: Sean Gillespie Date: Thu, 9 Nov 2017 09:58:47 -0800 Subject: [Local GC] Unify background GC thread and server GC thread creation (#14821) * Initial cut, ignoring thread affinity * Integrate thread affinity * Affinity for standalone Windows * Add 'specialness' and the thread name as arguments to CreateThread * First crack at unified implementation * Set priority for server GC threads * Remove unused parameter * Address code review feedback and remove some dead code that broke the clang build * Use char* on the interface instead of wchar_t (doesn't play well cross-platform) * Rename IsGCSpecialThread -> CurrentThreadWasCreatedByGC * Code review feedback and fix up the build * rename CurrentThreadWasCreatedByGC -> WasCurrentThreadCreatedByGC * Fix a contract violation when converting string encodings * Thread::CreateUtilityThread returns a thread that is not suspended - restarting a non-suspended thread is incorrect * CreateUnsuspendableThread -> CreateNonSuspendableThread --- src/gc/sample/gcenv.ee.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/gc/sample') diff --git a/src/gc/sample/gcenv.ee.cpp b/src/gc/sample/gcenv.ee.cpp index 8fd4487192..72ef9b5574 100644 --- a/src/gc/sample/gcenv.ee.cpp +++ b/src/gc/sample/gcenv.ee.cpp @@ -231,12 +231,6 @@ void GCToEEInterface::SyncBlockCachePromotionsGranted(int /*max_gen*/) { } -Thread* GCToEEInterface::CreateBackgroundThread(GCBackgroundThreadFunction threadStart, void* arg) -{ - // TODO: Implement for background GC - return NULL; -} - void GCToEEInterface::DiagGCStart(int gen, bool isInduced) { } @@ -321,7 +315,7 @@ bool GCToEEInterface::IsGCThread() return false; } -bool GCToEEInterface::IsGCSpecialThread() +bool GCToEEInterface::WasCurrentThreadCreatedByGC() { return false; } @@ -330,3 +324,8 @@ MethodTable* GCToEEInterface::GetFreeObjectMethodTable() { return g_pFreeObjectMethodTable; } + +bool GCToEEInterface::CreateThread(void (*threadStart)(void*), void* arg, bool is_suspendable, const char* name) +{ + return false; +} -- cgit v1.2.3