VirtualBox

忽略:
時間撮記:
2008-6-10 上午11:01:33 (16 年 以前)
作者:
vboxsync
訊息:

Cache the KeQueryActiveProcessors() result at init (see crash reading the mask at DPC_LEVEL in SUPDrv-win.cpp).

檔案:
修改 1 筆資料

圖例:

未更動
新增
刪除
  • trunk/src/VBox/Runtime/r0drv/nt/mp-r0drv-nt.cpp

    r9436 r9563  
    4040#include <iprt/asm.h>
    4141#include "r0drv/mp-r0drv.h"
     42#include "internal-r0drv-nt.h"
    4243
    4344
     
    9596        return false;
    9697
    97     /** @todo this must be done at init time as it's not safe under all circumstances (braindead OS design). */
     98#if 0 /* this isn't safe at all IRQLs (great work guys) */
    9899    KAFFINITY Mask = KeQueryActiveProcessors();
    99100    return !!(Mask & RT_BIT_64(idCpu));
     101#else
     102    return RTCpuSetIsMember(&g_rtMpNtCpuSet, idCpu);
     103#endif
    100104}
    101105
     
    125129RTDECL(PRTCPUSET) RTMpGetOnlineSet(PRTCPUSET pSet)
    126130{
     131#if 0 /* this isn't safe at all IRQLs (great work guys) */
    127132    KAFFINITY Mask = KeQueryActiveProcessors();
    128133    return RTCpuSetFromU64(pSet, Mask);
     134#else
     135    *pSet = g_rtMpNtCpuSet;
     136    return pSet;
     137#endif
    129138}
    130139
     
    255264}
    256265
     266
    257267RTDECL(int) RTMpOnAll(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    258268{
     
    260270}
    261271
     272
    262273RTDECL(int) RTMpOnOthers(PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
    263274{
    264275    return rtMpCall(pfnWorker, pvUser1, pvUser2, RT_NT_CPUID_OTHERS, 0);
    265276}
     277
    266278
    267279RTDECL(int) RTMpOnSpecific(RTCPUID idCpu, PFNRTMPWORKER pfnWorker, void *pvUser1, void *pvUser2)
注意: 瀏覽 TracChangeset 來幫助您使用更動檢視器

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