Changeset 20121 in vbox for trunk/src/VBox/VMM
- Timestamp:
- May 28, 2009 2:00:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/TM.cpp
r20096 r20121 2228 2228 2229 2229 2230 /** @name Saved state values 2231 * @{ */ 2232 #define TMTIMERSTATE_SAVED_PENDING_STOP 4 2233 #define TMTIMERSTATE_SAVED_PENDING_SCHEDULE 7 2234 /** @} */ 2235 2236 2230 2237 /** 2231 2238 * Saves the state of a timer to a saved state. … … 2243 2250 case TMTIMERSTATE_PENDING_STOP: 2244 2251 case TMTIMERSTATE_PENDING_STOP_SCHEDULE: 2245 return SSMR3PutU8(pSSM, (uint8_t)TMTIMERSTATE_PENDING_STOP);2252 return SSMR3PutU8(pSSM, TMTIMERSTATE_SAVED_PENDING_STOP); 2246 2253 2247 2254 case TMTIMERSTATE_PENDING_SCHEDULE_SET_EXPIRE: … … 2254 2261 case TMTIMERSTATE_PENDING_SCHEDULE: 2255 2262 case TMTIMERSTATE_PENDING_RESCHEDULE: 2256 SSMR3PutU8(pSSM, (uint8_t)TMTIMERSTATE_PENDING_SCHEDULE);2263 SSMR3PutU8(pSSM, TMTIMERSTATE_SAVED_PENDING_SCHEDULE); 2257 2264 return SSMR3PutU64(pSSM, pTimer->u64Expire); 2258 2265 … … 2289 2296 if (RT_FAILURE(rc)) 2290 2297 return rc; 2291 TMTIMERSTATE enmState = (TMTIMERSTATE)u8State; 2292 if ( enmState != TMTIMERSTATE_PENDING_STOP 2293 && enmState != TMTIMERSTATE_PENDING_SCHEDULE 2294 && enmState != TMTIMERSTATE_PENDING_STOP_SCHEDULE) 2295 { 2296 AssertMsgFailed(("enmState=%d %s\n", enmState, tmTimerState(enmState))); 2298 #if 1 /* Workaround for accidental state shift in r47786 (2009-05-26 19:12:12). */ /** @todo remove this in a few weeks! */ 2299 if ( u8State == TMTIMERSTATE_SAVED_PENDING_STOP + 1 2300 || u8State == TMTIMERSTATE_SAVED_PENDING_SCHEDULE + 1) 2301 u8State--; 2302 #endif 2303 if ( u8State != TMTIMERSTATE_SAVED_PENDING_STOP 2304 && u8State != TMTIMERSTATE_SAVED_PENDING_SCHEDULE) 2305 { 2306 AssertLogRelMsgFailed(("u8State=%d\n", u8State)); 2297 2307 return SSMR3HandleSetStatus(pSSM, VERR_TM_LOAD_STATE); 2298 2308 } 2299 2309 2300 if (enmState == TMTIMERSTATE_PENDING_SCHEDULE) 2310 /* Enter the critical section to make TMTimerSet/Stop happy. */ 2311 PPDMCRITSECT pCritSect = pTimer->pCritSect; 2312 if (pCritSect) 2313 PDMCritSectEnter(pCritSect, VERR_INTERNAL_ERROR); 2314 2315 if (u8State == TMTIMERSTATE_SAVED_PENDING_SCHEDULE) 2301 2316 { 2302 2317 /* … … 2311 2326 * Set it. 2312 2327 */ 2313 Log((" enmState=%d %s u64Expire=%llu\n", enmState, tmTimerState(enmState), u64Expire));2328 Log(("u8State=%d u64Expire=%llu\n", u8State, u64Expire)); 2314 2329 rc = TMTimerSet(pTimer, u64Expire); 2315 2330 } … … 2319 2334 * Stop it. 2320 2335 */ 2321 Log((" enmState=%d %s\n", enmState, tmTimerState(enmState)));2336 Log(("u8State=%d\n", u8State)); 2322 2337 rc = TMTimerStop(pTimer); 2323 2338 } 2339 2340 if (pCritSect) 2341 PDMCritSectLeave(pCritSect); 2324 2342 2325 2343 /*
Note:
See TracChangeset
for help on using the changeset viewer.