src/gc/windows/gcenv.windows.cpp
void GetGroupForProcessor(uint16_t processor_number, uint16_t* group_number, uint16_t* group_processor_number)
{
    assert(g_fEnableGCCPUGroups);

#if !defined(FEATURE_REDHAWK) && (defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_))
    WORD bTemp = 0;
    WORD bDiff = processor_number - bTemp;

    for (WORD i=0; i < g_nGroups; i++)
    {
        bTemp += g_CPUGroupInfoArray[i].nr_active;
        if (bTemp > processor_number)
        {
            *group_number = i;
            *group_processor_number = bDiff;
            break;
        }
        bDiff = processor_number - bTemp;
    }
#else
    *group_number = 0;
    *group_processor_number = 0;
#endif
}
// Get the CPU group for the specified processor
Get the CPU group for the specified processor
Get the CPU group for the specified processor
void GetGroupForProcessor(uint16_t processor_number, uint16_t* group_number, uint16_t* group_processor_number)
{
    assert(g_fEnableGCCPUGroups);
#if !defined(FEATURE_REDHAWK) && (defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_))
    WORD bTemp = 0;
    WORD bDiff = processor_number - bTemp;
    for (WORD i=0; i < g_nGroups; i++)
    {
        bTemp += g_CPUGroupInfoArray[i].nr_active;
        if (bTemp > processor_number)
        {
            *group_number = i;
            *group_processor_number = bDiff;
            break;
        }
        bDiff = processor_number - bTemp;
    }
#else
    *group_number = 0;
    *group_processor_number = 0;
#endif
}
void GetGroupForProcessor ( uint16_t processor_number , uint16_t * group_number , uint16_t * group_processor_number ) { assert ( g_fEnableGCCPUGroups ) ; #if ! defined ( FEATURE_REDHAWK ) && ( defined ( _TARGET_AMD64_ ) || defined ( _TARGET_ARM64_ ) ) WORD bTemp = 0 ; WORD bDiff = processor_number - bTemp ; for ( WORD i = 0 ; i < g_nGroups ; i ++ ) { bTemp += g_CPUGroupInfoArray [ i ] . nr_active ; if ( bTemp > processor_number ) { * group_number = i ; * group_processor_number = bDiff ; break ; } bDiff = processor_number - bTemp ; } #else * group_number = 0 ; * group_processor_number = 0 ; #endif }
Get the CPU group for the specified processor
Get the CPU group for the specified processor