VirtualBox

Changeset 11319 in vbox for trunk/src


Ignore:
Timestamp:
Aug 11, 2008 10:11:00 AM (16 years ago)
Author:
vboxsync
Message:

suplib: Use RTMpGetCount and RTMpGetOnlineSet instead of RTSystemProcessorGetCount and RTSystemProcessorGetActiveMask.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostDrivers/Support/SUPLib.cpp

    r10805 r11319  
    6464#include <iprt/ldr.h>
    6565#include <iprt/asm.h>
    66 #include <iprt/system.h>
     66#include <iprt/mp.h>
     67#include <iprt/cpuset.h>
    6768#include <iprt/thread.h>
    6869#include <iprt/process.h>
     
    12001201
    12011202    int rc = VINF_SUCCESS;
    1202     const unsigned  cCpus = RTSystemProcessorGetCount();
     1203    const RTCPUID cCpus = RTMpGetCount();
    12031204    if (cCpus <= 1)
    12041205    {
     
    12241225        /* SMP */
    12251226        uint64_t        u64AffMaskSaved = RTThreadGetAffinity();
    1226         uint64_t        u64AffMaskPatched = RTSystemProcessorGetActiveMask() & u64AffMaskSaved;
     1227        uint64_t        u64AffMaskPatched = RTCpuSetToU64(RTMpGetOnlineSet(&OnlineSet)) & u64AffMaskSaved;
    12271228        unsigned        cCpusPatched = 0;
     1229        AssertLogRelReturn(cCpus < 64);
    12281230
    12291231        for (int i = 0; i < 64; i++)
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