Changeset 65896 in vbox for trunk/src/VBox/VMM/VMMR3
- Timestamp:
- Feb 28, 2017 12:17:31 PM (8 years ago)
- svn:sync-xref-src-repo-rev:
- 113688
- Location:
- trunk/src/VBox/VMM/VMMR3
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/VMMR3/TM.cpp
r63739 r65896 2690 2690 2691 2691 /** 2692 * Skips the state of a timer in a given saved state. 2693 * 2694 * @returns VBox status. 2695 * @param pSSM Save State Manager handle. 2696 * @param pfActive Where to store whether the timer was active 2697 * when the state was saved. 2698 */ 2699 VMMR3DECL(int) TMR3TimerSkip(PSSMHANDLE pSSM, bool *pfActive) 2700 { 2701 Assert(pSSM); AssertPtr(pfActive); 2702 LogFlow(("TMR3TimerSkip: pSSM=%p pfActive=%p\n", pSSM, pfActive)); 2703 2704 /* 2705 * Load the state and validate it. 2706 */ 2707 uint8_t u8State; 2708 int rc = SSMR3GetU8(pSSM, &u8State); 2709 if (RT_FAILURE(rc)) 2710 return rc; 2711 #if 1 /* Workaround for accidental state shift in r47786 (2009-05-26 19:12:12). */ /** @todo remove this in a few weeks! */ 2712 if ( u8State == TMTIMERSTATE_SAVED_PENDING_STOP + 1 2713 || u8State == TMTIMERSTATE_SAVED_PENDING_SCHEDULE + 1) 2714 u8State--; 2715 #endif 2716 if ( u8State != TMTIMERSTATE_SAVED_PENDING_STOP 2717 && u8State != TMTIMERSTATE_SAVED_PENDING_SCHEDULE) 2718 { 2719 AssertLogRelMsgFailed(("u8State=%d\n", u8State)); 2720 return SSMR3HandleSetStatus(pSSM, VERR_TM_LOAD_STATE); 2721 } 2722 2723 *pfActive = (u8State == TMTIMERSTATE_SAVED_PENDING_SCHEDULE); 2724 if (*pfActive) 2725 { 2726 /* 2727 * Load the expire time. 2728 */ 2729 uint64_t u64Expire; 2730 rc = SSMR3GetU64(pSSM, &u64Expire); 2731 if (RT_FAILURE(rc)) 2732 return rc; 2733 } 2734 2735 /* 2736 * On failure set SSM status. 2737 */ 2738 if (RT_FAILURE(rc)) 2739 rc = SSMR3HandleSetStatus(pSSM, rc); 2740 return rc; 2741 } 2742 2743 2744 /** 2692 2745 * Associates a critical section with a timer. 2693 2746 * -
trunk/src/VBox/VMM/VMMR3/VMMR3.def
r64590 r65896 356 356 TMR3TimerLoad 357 357 TMR3TimerSave 358 TMR3TimerSkip 358 359 TMR3TimerDestroy 359 360 TMTimerFromMicro
Note:
See TracChangeset
for help on using the changeset viewer.