diff options
Diffstat (limited to 'src/gc/sample')
-rw-r--r-- | src/gc/sample/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/gc/sample/GCSample.cpp | 13 | ||||
-rw-r--r-- | src/gc/sample/GCSample.vcxproj | 2 | ||||
-rw-r--r-- | src/gc/sample/gcenv.ee.cpp | 9 |
4 files changed, 8 insertions, 18 deletions
diff --git a/src/gc/sample/CMakeLists.txt b/src/gc/sample/CMakeLists.txt index 9552cc51e2..29fd32f2ff 100644 --- a/src/gc/sample/CMakeLists.txt +++ b/src/gc/sample/CMakeLists.txt @@ -22,7 +22,7 @@ set(SOURCES if(WIN32) list(APPEND SOURCES - ../gcenv.windows.cpp) + ../windows/gcenv.windows.cpp) add_definitions(-DUNICODE=1) else() list(APPEND SOURCES diff --git a/src/gc/sample/GCSample.cpp b/src/gc/sample/GCSample.cpp index 664dc38e94..112d291420 100644 --- a/src/gc/sample/GCSample.cpp +++ b/src/gc/sample/GCSample.cpp @@ -94,14 +94,11 @@ inline void ErectWriteBarrier(Object ** dst, Object * ref) if (((uint8_t*)dst < g_gc_lowest_address) || ((uint8_t*)dst >= g_gc_highest_address)) return; - if((uint8_t*)ref >= g_gc_ephemeral_low && (uint8_t*)ref < g_gc_ephemeral_high) - { - // volatile is used here to prevent fetch of g_card_table from being reordered - // with g_lowest/highest_address check above. See comment in code:gc_heap::grow_brick_card_tables. - uint8_t* pCardByte = (uint8_t *)*(volatile uint8_t **)(&g_gc_card_table) + card_byte((uint8_t *)dst); - if(*pCardByte != 0xFF) - *pCardByte = 0xFF; - } + // volatile is used here to prevent fetch of g_card_table from being reordered + // with g_lowest/highest_address check above. See comment in code:gc_heap::grow_brick_card_tables. + uint8_t* pCardByte = (uint8_t *)*(volatile uint8_t **)(&g_gc_card_table) + card_byte((uint8_t *)dst); + if(*pCardByte != 0xFF) + *pCardByte = 0xFF; } void WriteBarrier(Object ** dst, Object * ref) diff --git a/src/gc/sample/GCSample.vcxproj b/src/gc/sample/GCSample.vcxproj index 1716f462ee..105e289c1a 100644 --- a/src/gc/sample/GCSample.vcxproj +++ b/src/gc/sample/GCSample.vcxproj @@ -87,7 +87,7 @@ <ClCompile Include="GCSample.cpp" /> <ClCompile Include="..\gccommon.cpp" /> <ClCompile Include="..\gceewks.cpp" /> - <ClCompile Include="..\gcenv.windows.cpp"> + <ClCompile Include="..\windows\gcenv.windows.cpp"> <PrecompiledHeader>NotUsing</PrecompiledHeader> </ClCompile> <ClCompile Include="..\gcscan.cpp" /> diff --git a/src/gc/sample/gcenv.ee.cpp b/src/gc/sample/gcenv.ee.cpp index ac227b4823..e95a78dc48 100644 --- a/src/gc/sample/gcenv.ee.cpp +++ b/src/gc/sample/gcenv.ee.cpp @@ -13,8 +13,6 @@ MethodTable * g_pFreeObjectMethodTable; int32_t g_TrapReturningThreads; -bool g_fFinalizerRunOnShutDown; - EEConfig * g_pConfig; bool CLREventStatic::CreateManualEventNoThrow(bool bInitialState) @@ -259,17 +257,12 @@ void GCToEEInterface::StompWriteBarrier(WriteBarrierParameters* args) { } -void FinalizerThread::EnableFinalization() +void GCToEEInterface::EnableFinalization(bool foundFinalizers) { // Signal to finalizer thread that there are objects to finalize // TODO: Implement for finalization } -bool FinalizerThread::HaveExtraWorkForFinalizer() -{ - return false; -} - bool IsGCSpecialThread() { // TODO: Implement for background GC |