Changeset 54718 in vbox for trunk/include
- Timestamp:
- Mar 11, 2015 4:14:41 PM (10 years ago)
- Location:
- trunk/include/VBox/vmm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm.h
r54712 r54718 182 182 # define HM_DISABLE_PREEMPT_IF_NEEDED() \ 183 183 RTTHREADPREEMPTSTATE PreemptStateInternal = RTTHREADPREEMPTSTATE_INITIALIZER; \ 184 bool fPreemptDisabledInternal = false; \ 185 if (RTThreadPreemptIsEnabled(NIL_RTTHREAD)) \ 186 { \ 187 Assert(VMMR0ThreadCtxHooksAreRegistered(pVCpu)); \ 188 RTThreadPreemptDisable(&PreemptStateInternal); \ 189 fPreemptDisabledInternal = true; \ 190 } else do { } while (0) 191 192 # define HM_RESTORE_PREEMPT_IF_NEEDED() \ 193 do \ 194 { \ 195 if (fPreemptDisabledInternal) \ 196 RTThreadPreemptRestore(&PreemptStateInternal); \ 197 } while (0) 184 Assert(!RTThreadPreemptIsEnabled(NIL_RTTHREAD) || VMMR0ThreadCtxHooksAreRegistered(pVCpu)); \ 185 RTThreadPreemptDisable(&PreemptStateInternal); 198 186 #else 199 187 # define HM_DISABLE_PREEMPT_IF_NEEDED() \ 200 188 RTTHREADPREEMPTSTATE PreemptStateInternal = RTTHREADPREEMPTSTATE_INITIALIZER; \ 201 189 RTThreadPreemptDisable(&PreemptStateInternal); 202 190 #endif /* VBOX_STRICT */ 203 191 # define HM_RESTORE_PREEMPT_IF_NEEDED() do { RTThreadPreemptRestore(&PreemptStateInternal); } while(0) 204 #endif /* VBOX_STRICT */ 192 205 193 206 194 VMMR0_INT_DECL(int) HMR0SetupVM(PVM pVM); -
trunk/include/VBox/vmm/vmm.h
r53615 r54718 513 513 VMMR0DECL(bool) VMMR0ThreadCtxHooksAreCreated(PVMCPU pVCpu); 514 514 VMMR0DECL(int) VMMR0ThreadCtxHooksRegister(PVMCPU pVCpu, PFNRTTHREADCTXHOOK pfnHook); 515 VMMR0DECL( int)VMMR0ThreadCtxHooksDeregister(PVMCPU pVCpu);515 VMMR0DECL(void) VMMR0ThreadCtxHooksDeregister(PVMCPU pVCpu); 516 516 VMMR0DECL(bool) VMMR0ThreadCtxHooksAreRegistered(PVMCPU pVCpu); 517 517
Note:
See TracChangeset
for help on using the changeset viewer.