Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<EnableDefaultItems>false</EnableDefaultItems>
Expand Down Expand Up @@ -237,7 +237,6 @@
<Compile Include="$(BclSourcesRoot)\System\Text\StringBuilder.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Interlocked.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Monitor.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Overlapped.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\SynchronizationContext.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\Thread.CoreCLR.cs" />
<Compile Include="$(BclSourcesRoot)\System\Threading\ProcessorIdCache.cs" />
Expand Down
204 changes: 0 additions & 204 deletions src/coreclr/System.Private.CoreLib/src/System/Threading/Overlapped.cs

This file was deleted.

1 change: 0 additions & 1 deletion src/coreclr/dlls/mscorrc/mscorrc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,6 @@ BEGIN
IDS_EE_CANNOTCASTSAME "[A]%1 cannot be cast to [B]%2. %3. %4."
IDS_EE_CANNOTCAST_HELPER_PATH "Type %s originates from '%s' in the context '%s' at location '%s'"
IDS_EE_CANNOTCAST_HELPER_BYTE "Type %s originates from '%s' in the context '%s' in a byte array"
IDS_EE_NOTISOMORPHIC "Object contains references."
IDS_EE_INVALID_VT_FOR_CUSTOM_MARHALER "Type of the VARIANT specified for a parameter with a custom marshaler is not supported by the custom marshaler."
IDS_EE_BAD_COMEXTENDS_CLASS "Types extending from COM objects should override all methods of an interface implemented by the base COM class."
IDS_EE_INTERFACE_NOT_DISPATCH_BASED "The interface does not support late bound calls since it does not derive from IDispatch."
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/dlls/mscorrc/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,6 @@
#define IDS_EE_COM_OBJECT_NO_LONGER_HAS_WRAPPER 0x17d9
#define IDS_EE_NDIRECT_BADNATL_CALLCONV 0x17df
#define IDS_EE_CANNOTCAST 0x17e0
#define IDS_EE_NOTISOMORPHIC 0x17e1

#define IDS_EE_NOCUSTOMMARSHALER 0x17e7
#define IDS_EE_SIZECONTROLOUTOFRANGE 0x17e8
Expand Down
2 changes: 0 additions & 2 deletions src/coreclr/gc/gcee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ void GCHeap::UpdatePostGCCounters()
size_t promoted_finalization_mem = 0;
size_t total_num_pinned_objects = gc_heap::get_total_pinned_objects();

#ifndef FEATURE_NATIVEAOT
// if a max gen garbage collection was performed, resync the GC Handle counter;
// if threads are currently suspended, we do not need to obtain a lock on each handle table
if (condemned_gen == max_generation)
total_num_gc_handles = HndCountAllHandles(!IsGCInProgress());
#endif //FEATURE_NATIVEAOT

// per generation calculation.
for (int gen_index = 0; gen_index < total_generation_count; gen_index++)
Expand Down
4 changes: 4 additions & 0 deletions src/coreclr/gc/handletable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,6 +521,7 @@ void HndLogSetEvent(OBJECTHANDLE handle, _UNCHECKED_OBJECTREF value)
FIRE_EVENT(SetGCHandle, (void *)handle, (void *)value, hndType, generation);
FIRE_EVENT(PrvSetGCHandle, (void *) handle, (void *)value, hndType, generation);

#ifdef FEATURE_ASYNC_PINNED_HANDLES
// Also fire the things pinned by Async pinned handles
if (hndType == HNDTYPE_ASYNCPINNED)
{
Expand All @@ -531,6 +532,7 @@ void HndLogSetEvent(OBJECTHANDLE handle, _UNCHECKED_OBJECTREF value)
FIRE_EVENT(SetGCHandle, (void *)overlapped, (void *)to, HNDTYPE_PINNED, generation);
});
}
#endif
}
#else
UNREFERENCED_PARAMETER(handle);
Expand Down Expand Up @@ -578,12 +580,14 @@ void HndWriteBarrierWorker(OBJECTHANDLE handle, _UNCHECKED_OBJECTREF value)
int generation = g_theGCHeap->WhichGeneration(value);
uint32_t uType = HandleFetchType(handle);

#ifdef FEATURE_ASYNC_PINNED_HANDLES
//OverlappedData need special treatment: because all user data pointed by it needs to be reported by this handle,
//its age is consider to be min age of the user data, to be simple, we just make it 0
if (uType == HNDTYPE_ASYNCPINNED)
{
generation = 0;
}
#endif

if (uType == HNDTYPE_DEPENDENT)
{
Expand Down
7 changes: 7 additions & 0 deletions src/coreclr/gc/handletablepriv.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@

#include "handletable.h"


// Build support for async pinned handles into standalone GC to make it usable with older runtimes
#if defined(BUILD_AS_STANDALONE) && !defined(FEATURE_NATIVEAOT)
#define FEATURE_ASYNC_PINNED_HANDLES
#endif


/*--------------------------------------------------------------------------*/

//<TODO>@TODO: find a home for this in a project-level header file</TODO>
Expand Down
5 changes: 5 additions & 0 deletions src/coreclr/gc/handletablescan.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,7 @@ void BlockResetAgeMapForBlocksWorker(uint32_t *pdwGen, uint32_t dwClumpMask, Sca
if (minAge > thisAge)
minAge = thisAge;

#ifdef FEATURE_ASYNC_PINNED_HANDLES
GCToEEInterface::WalkAsyncPinned(*pValue, &minAge,
[](Object*, Object* to, void* ctx)
{
Expand All @@ -825,6 +826,7 @@ void BlockResetAgeMapForBlocksWorker(uint32_t *pdwGen, uint32_t dwClumpMask, Sca
*minAge = generation;
}
});
#endif
}
}
_ASSERTE(FitsInU1(minAge));
Expand Down Expand Up @@ -966,12 +968,15 @@ void BlockVerifyAgeMapForBlocksWorker(uint32_t *pdwGen, uint32_t dwClumpMask, Sc
if (!HndIsNullOrDestroyedHandle(*pValue))
{
VerifyObjectAndAge((*pValue), (*pValue), minAge);

#ifdef FEATURE_ASYNC_PINNED_HANDLES
GCToEEInterface::WalkAsyncPinned(*pValue, &minAge,
[](Object* from, Object* object, void* age)
{
uint8_t* minAge = reinterpret_cast<uint8_t*>(age);
VerifyObjectAndAge(from, object, *minAge);
});
#endif

if (uType == HNDTYPE_DEPENDENT)
{
Expand Down
Loading