Changeset 24268 in vbox
- Timestamp:
- Nov 2, 2009 3:33:38 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/VMM/SSM.cpp (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/SSM.cpp
r24264 r24268 535 535 /** The pass number of the current unit if in the load exec stage. */ 536 536 uint32_t uCurUnitPass; 537 /** Whether SSMR3SetLoadError[V] has been called. */ 538 bool fHaveSetError; 537 /** Whether SSMR3SetLoadError[V] has been called. 538 * @note Using ASMAtomicXchgBool because I'm very lazy. */ 539 bool volatile fHaveSetError; 539 540 /** @} */ 540 541 … … 7632 7633 { 7633 7634 LogRel(("SSM: Unit '%s' read %lld bytes too much!\n", pszName, i64Diff)); 7634 if (! pSSM->u.Read.fHaveSetError)7635 if (!ASMAtomicXchgBool(&pSSM->u.Read.fHaveSetError, true)) 7635 7636 rc = VMSetError(pVM, VERR_SSM_LOADED_TOO_MUCH, RT_SRC_POS, 7636 7637 N_("Unit '%s' read %lld bytes too much"), pszName, i64Diff); … … 7644 7645 LogRel(("SSM: Load exec failed for '%s' instance #%u ! (version %u)\n", 7645 7646 pszName, UnitHdr.u32Instance, UnitHdr.u32Version)); 7646 if (! pSSM->u.Read.fHaveSetError)7647 if (!ASMAtomicXchgBool(&pSSM->u.Read.fHaveSetError, true)) 7647 7648 VMSetError(pVM, rc, RT_SRC_POS, N_("Load exec failed for '%s' instance #%u (version %u)"), 7648 7649 pszName, UnitHdr.u32Instance, UnitHdr.u32Version); … … 7811 7812 LogRel(("SSM: Unit at %#llx (%lld): Invalid unit magic: %.*Rhxs!\n", 7812 7813 offUnit, offUnit, sizeof(UnitHdr.szMagic) - 1, &UnitHdr.szMagic[0])); 7814 pSSM->u.Read.fHaveSetError = true; 7813 7815 return VMSetError(pVM, VERR_SSM_INTEGRITY_UNIT_MAGIC, RT_SRC_POS, 7814 7816 N_("Unit at %#llx (%lld): Invalid unit magic"), offUnit, offUnit); … … 7904 7906 LogRel(("SSM: LoadExec failed for '%s' instance #%u (version %u, pass %#x): %Rrc\n", 7905 7907 UnitHdr.szName, UnitHdr.u32Instance, UnitHdr.u32Version, UnitHdr.u32Pass, rc)); 7906 if (! pSSM->u.Read.fHaveSetError)7908 if (!ASMAtomicXchgBool(&pSSM->u.Read.fHaveSetError, true)) 7907 7909 rc = VMSetError(pVM, rc, RT_SRC_POS, N_("Failed to load unit '%s'"), UnitHdr.szName); 7908 7910 return rc; … … 7916 7918 LogRel(("SSM: Found no handler for unit '%s' instance #%u!\n", UnitHdr.szName, UnitHdr.u32Instance)); 7917 7919 if (pSSM->enmAfter != SSMAFTER_DEBUG_IT) 7920 { 7921 pSSM->u.Read.fHaveSetError = true; 7918 7922 return VMSetError(pVM, VERR_SSM_INTEGRITY_UNIT_NOT_FOUND, RT_SRC_POS, 7919 7923 N_("Found no handler for unit '%s' instance #%u"), UnitHdr.szName, UnitHdr.u32Instance); 7924 } 7920 7925 SSMR3SkipToEndOfUnit(pSSM); 7921 7926 ssmR3DataReadFinishV2(pSSM); … … 8127 8132 LogRel(("SSM: LoadDone failed with rc=%Rrc for data unit '%s' instance #%u.\n", 8128 8133 rc, pUnit->szName, pUnit->u32Instance)); 8134 if (!ASMAtomicXchgBool(&Handle.u.Read.fHaveSetError, true)) 8135 VMSetError(pVM, rc, RT_SRC_POS, N_("LoadDone failed with rc=%Rrc for data unit '%s' instance #%u."), 8136 rc, pUnit->szName, pUnit->u32Instance); 8129 8137 if (RT_SUCCESS_NP(Handle.rc)) 8130 8138 Handle.rc = rc;
Note:
See TracChangeset
for help on using the changeset viewer.

