Changeset 58884 in vbox
- Timestamp:
- Nov 26, 2015 2:04:29 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrvGip.cpp
r58883 r58884 4249 4249 SUPDRVTSCDELTATHREADSTATE enmNewState) 4250 4250 { 4251 SUPDRVTSCDELTATHREADSTATE enmActualState; 4252 int rc; 4253 4251 4254 /* 4252 4255 * Wait a short while for the expected state transition. 4253 4256 */ 4254 int rc;4255 4257 RTSemEventWait(pDevExt->hTscDeltaEvent, RT_MS_1SEC); 4256 4258 RTSpinlockAcquire(pDevExt->hTscDeltaSpinlock); 4257 if (pDevExt->enmTscDeltaThreadState == enmNewState) 4259 enmActualState = pDevExt->enmTscDeltaThreadState; 4260 if (enmActualState == enmNewState) 4258 4261 { 4259 4262 RTSpinlockRelease(pDevExt->hTscDeltaSpinlock); 4260 4263 rc = VINF_SUCCESS; 4261 4264 } 4262 else if ( pDevExt->enmTscDeltaThreadState == enmCurState)4265 else if (enmActualState == enmCurState) 4263 4266 { 4264 4267 /* … … 4273 4276 * Check the state whether we've succeeded. 4274 4277 */ 4275 SUPDRVTSCDELTATHREADSTATE enmState;4276 4278 RTSpinlockAcquire(pDevExt->hTscDeltaSpinlock); 4277 enm State = pDevExt->enmTscDeltaThreadState;4279 enmActualState = pDevExt->enmTscDeltaThreadState; 4278 4280 RTSpinlockRelease(pDevExt->hTscDeltaSpinlock); 4279 if (enm State == enmNewState)4281 if (enmActualState == enmNewState) 4280 4282 rc = VINF_SUCCESS; 4281 else if (enm State == enmCurState)4283 else if (enmActualState == enmCurState) 4282 4284 { 4283 4285 rc = VERR_TIMEOUT; 4284 OSDBGPRINT(("supdrvTscDeltaThreadWait: timed out state transition. enm State=%d enmNewState=%d\n", enmState,4285 enm NewState));4286 OSDBGPRINT(("supdrvTscDeltaThreadWait: timed out state transition. enmActualState=%d enmNewState=%d\n", 4287 enmActualState, enmNewState)); 4286 4288 } 4287 4289 else … … 4289 4291 rc = VERR_INTERNAL_ERROR; 4290 4292 OSDBGPRINT(("supdrvTscDeltaThreadWait: invalid state transition from %d to %d, expected %d\n", enmCurState, 4291 enm State, enmNewState));4293 enmActualState, enmNewState)); 4292 4294 } 4293 4295 } … … 4298 4300 { 4299 4301 RTSpinlockRelease(pDevExt->hTscDeltaSpinlock); 4300 OSDBGPRINT(("supdrvTscDeltaThreadWait: invalid state transition from %d to %d\n", enmCurState, enmNewState)); 4302 OSDBGPRINT(("supdrvTscDeltaThreadWait: invalid state %d when transitioning from %d to %d\n", 4303 enmActualState, enmCurState, enmNewState)); 4301 4304 rc = VERR_INTERNAL_ERROR; 4302 4305 }
Note:
See TracChangeset
for help on using the changeset viewer.