VirtualBox

Changeset 54712 in vbox for trunk/include/VBox


Ignore:
Timestamp:
Mar 11, 2015 12:54:03 PM (10 years ago)
Author:
vboxsync
Message:

VMM: Clear idHostCpu mapping while deregistering the context-hooks rather than in HMR0Leave().
Simplified HMR0_[DISABLE|RESTORE]_PREEMPT_IF_NEEDED() and made VMMR0ThreadCtxHooksDeregister() check before deregistering the
hook rather than asking the caller to do it each time.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/hm.h

    r53615 r54712  
    179179VMMR0_INT_DECL(void)            HMR0SavePendingIOPortRead(PVMCPU pVCpu, RTGCPTR GCPtrRip, RTGCPTR GCPtrRipNext,
    180180                                                          unsigned uPort, unsigned uAndVal, unsigned cbSize);
    181 /** Disables preemption if required. */
     181#ifdef VBOX_STRICT
    182182# define HM_DISABLE_PREEMPT_IF_NEEDED() \
    183183    RTTHREADPREEMPTSTATE PreemptStateInternal = RTTHREADPREEMPTSTATE_INITIALIZER; \
     
    190190    } else do { } while (0)
    191191
    192 /** Restores preemption if previously disabled by HM_DISABLE_PREEMPT(). */
    193192# define HM_RESTORE_PREEMPT_IF_NEEDED() \
    194193    do \
     
    197196            RTThreadPreemptRestore(&PreemptStateInternal); \
    198197    } while (0)
     198#else
     199# define HM_DISABLE_PREEMPT_IF_NEEDED() \
     200    RTTHREADPREEMPTSTATE PreemptStateInternal = RTTHREADPREEMPTSTATE_INITIALIZER; \
     201    RTThreadPreemptDisable(&PreemptStateInternal);
     202
     203# define HM_RESTORE_PREEMPT_IF_NEEDED() do { RTThreadPreemptRestore(&PreemptStateInternal); } while(0)
     204#endif /* VBOX_STRICT */
    199205
    200206VMMR0_INT_DECL(int)             HMR0SetupVM(PVM 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