VirtualBox

Changeset 19333 in vbox for trunk


Ignore:
Timestamp:
May 4, 2009 3:57:43 PM (16 years ago)
Author:
vboxsync
Message:

EMT macro updates.

Location:
trunk
Files:
2 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
  • trunk/src/VBox/VMM/PGMPool.cpp

    r19300 r19333  
    526526     * We cannot flush a page if we're in an async thread because of REM notifications.
    527527     */
    528     if (!VM_IS_EMT(pVM))
     528    if (!pVCpu)
    529529    {
    530530        Log(("pgmR3PoolAccessHandler: async thread, requesting EMT to flush the page: %p:{.Core=%RHp, .idx=%d, .GCPhys=%RGp, .enmType=%d}\n",
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