VirtualBox

Changeset 64293 in vbox for trunk/src


Ignore:
Timestamp:
Oct 17, 2016 11:34:18 AM (8 years ago)
Author:
vboxsync
Message:

mp-win.cpp: Can't skip lazy GIP re-initialization anywhere, because GIP may have a different max CPU count on Vista level systems.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/r3/win/mp-win.cpp

    r64283 r64293  
    5757*   Defined Constants And Macros                                                                                                 *
    5858*********************************************************************************************************************************/
    59 /** @def RTMPWIN_UPDATE_GIP_GLOBAL
     59/** @def RTMPWIN_UPDATE_GIP_GLOBALS
    6060 * Does lazy (re-)initialization using information provieded by GIP. */
    6161#ifdef IPRT_WITH_GIP_MP_INFO
    62 # define RTMPWIN_UPDATE_GIP_GLOBAL() \
     62# define RTMPWIN_UPDATE_GIP_GLOBALS() \
    6363    do { RTMPWIN_UPDATE_GIP_GLOBALS_AND_GET_PGIP(); } while (0)
    6464#else
    65 # define RTMPWIN_UPDATE_GIP_GLOBAL() do { } while (0)
     65# define RTMPWIN_UPDATE_GIP_GLOBALS() do { } while (0)
    6666#endif
    6767
     
    523523{
    524524    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
    525     RTMPWIN_UPDATE_GIP_GLOBAL();
     525    RTMPWIN_UPDATE_GIP_GLOBALS();
    526526
    527527#ifdef IPRT_WITH_RTCPUID_AS_GROUP_AND_NUMBER
     
    540540{
    541541    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
    542     RTMPWIN_UPDATE_GIP_GLOBAL();
     542    RTMPWIN_UPDATE_GIP_GLOBALS();
    543543
    544544    if ((unsigned)iCpu < RT_ELEMENTS(g_aidRtMpWinByCpuSetIdx))
     
    568568RTDECL(int) RTMpSetIndexFromCpuGroupMember(uint32_t idxGroup, uint32_t idxMember)
    569569{
     570    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     571    RTMPWIN_UPDATE_GIP_GLOBALS();
     572
    570573    if (idxGroup < g_cRtMpWinMaxCpuGroups)
    571574        if (idxMember < g_aRtMpWinCpuGroups[idxGroup].cMaxCpus)
     
    577580RTDECL(uint32_t) RTMpGetCpuGroupCounts(uint32_t idxGroup, uint32_t *pcActive)
    578581{
     582    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     583    RTMPWIN_UPDATE_GIP_GLOBALS();
     584
    579585    if (idxGroup < g_cRtMpWinMaxCpuGroups)
    580586    {
     
    591597RTDECL(uint32_t) RTMpGetMaxCpuGroupCount(void)
    592598{
     599    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     600    RTMPWIN_UPDATE_GIP_GLOBALS();
     601
    593602    return g_cRtMpWinMaxCpuGroups;
    594603}
     
    603612{
    604613    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
    605 #ifdef IPRT_WITH_RTCPUID_AS_GROUP_AND_NUMBER
    606     RTMPWIN_UPDATE_GIP_GLOBAL();
    607 #endif
     614    RTMPWIN_UPDATE_GIP_GLOBALS();
    608615
    609616    PROCESSOR_NUMBER ProcNum;
     
    643650{
    644651    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     652    RTMPWIN_UPDATE_GIP_GLOBALS();
     653
    645654#ifdef IPRT_WITH_RTCPUID_AS_GROUP_AND_NUMBER
    646655    return RTMPCPUID_FROM_GROUP_AND_NUMBER(g_cRtMpWinMaxCpuGroups - 1,
     
    655664{
    656665    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
    657     RTMPWIN_UPDATE_GIP_GLOBAL();
     666    RTMPWIN_UPDATE_GIP_GLOBALS();
    658667
    659668    /* Any CPU between 0 and g_cRtMpWinMaxCpus are possible. */
     
    675684{
    676685    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     686    RTMPWIN_UPDATE_GIP_GLOBALS();
    677687
    678688    return g_cRtMpWinMaxCpus;
     
    683693{
    684694    RTOnce(&g_MpInitOnce, rtMpWinInitOnce, NULL);
     695    RTMPWIN_UPDATE_GIP_GLOBALS();
    685696
    686697    return g_cRtMpWinMaxCpuCores;
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette