VirtualBox

Changeset 13974 in vbox for trunk/src/VBox/VMM/VMMAll


Ignore:
Timestamp:
Nov 7, 2008 4:28:05 PM (16 years ago)
Author:
vboxsync
Message:

Non-EMT threads get CPU 0 by default.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/VMM/VMMAll/VMMAll.cpp

    r13972 r13974  
    5858VMCPUID VMMGetCpuId(PVM pVM)
    5959{
     60#ifdef IN_RING3
     61    /* Only emulation thread(s) allowed to ask for CPU id */
     62    if (!VM_IS_EMT(pVM))
     63        return 0;
     64#endif
     65
    6066    /* Only emulation thread(s) allowed to ask for CPU id */
    6167    VM_ASSERT_EMT(pVM);
     
    8187PVMCPU VMMGetCpu(PVM pVM)
    8288{
     89#ifdef IN_RING3
     90    /* Only emulation thread(s) allowed to ask for CPU id */
     91    if (!VM_IS_EMT(pVM))
     92        return &pVM->aCpus[0];
     93#endif
    8394    /* Only emulation thread(s) allowed to ask for CPU id */
    8495    VM_ASSERT_EMT(pVM);
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