VirtualBox

Changeset 19333 in vbox for trunk/include


Ignore:
Timestamp:
May 4, 2009 3:57:43 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
46811
Message:

EMT macro updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vm.h

    r19326 r19333  
    3737#include <VBox/vmapi.h>
    3838#include <VBox/sup.h>
     39#include <VBox/vmm.h>
    3940
    4041
     
    428429#ifdef IN_RC
    429430# define VM_IS_EMT(pVM)                     true
    430 #elif defined(IN_RING0)
    431 # define VM_IS_EMT(pVM)                     true
    432431#else
    433 /** @todo need to rework this macro for the case of multiple emulation threads for SMP */
    434 # define VM_IS_EMT(pVM)                     (VMR3GetVMCPUNativeThread(pVM) == RTThreadNativeSelf())
     432# define VM_IS_EMT(pVM)                     (VMMGetCpu(pVM) != NULL)
    435433#endif
    436434
     
    441439#ifdef IN_RC
    442440# define VMCPU_IS_EMT(pVCpu)                true
    443 #elif defined(IN_RING0)
    444 # define VMCPU_IS_EMT(pVCpu)                fixme - need to call HWACCM I think... /** @todo SMP */
    445441#else
    446 /** @todo need to rework this macro for the case of multiple emulation threads for SMP */
    447 # define VMCPU_IS_EMT(pVCpu)                ((pVCpu)->hNativeThread == RTThreadNativeSelf())
     442# define VMCPU_IS_EMT(pVCpu)                (pVCpu && (pVCpu == VMMGetCpu(pVCpu->CTX_SUFF(pVM))))
    448443#endif
    449444
Note: See TracChangeset for help on using the changeset viewer.

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