- Timestamp:
- Jan 2, 2013 12:24:08 PM (12 years ago)
- svn:sync-xref-src-repo-rev:
- 83036
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/testcase/tstRTR0Timer.cpp
r39083 r44228 400 400 do /* break loop */ 401 401 { 402 RT_ZERO(State); 402 RT_ZERO(State); ASMAtomicWriteU32(&State.cShots, State.cShots); 403 403 RTR0TESTR0_CHECK_RC_BREAK(RTTimerStart(pTimer, 0), VINF_SUCCESS); 404 404 for (uint32_t i = 0; i < 1000 && !ASMAtomicUoReadU32(&State.cShots); i++) … … 407 407 408 408 /* check that it is restartable. */ 409 RT_ZERO(State); 409 RT_ZERO(State); ASMAtomicWriteU32(&State.cShots, State.cShots); 410 410 RTR0TESTR0_CHECK_RC_BREAK(RTTimerStart(pTimer, 0), VINF_SUCCESS); 411 411 for (uint32_t i = 0; i < 1000 && !ASMAtomicUoReadU32(&State.cShots); i++) … … 414 414 415 415 /* check that it respects the timeout value and can be cancelled. */ 416 RT_ZERO(State); 416 RT_ZERO(State); ASMAtomicWriteU32(&State.cShots, State.cShots); 417 417 RTR0TESTR0_CHECK_RC(RTTimerStart(pTimer, 5*UINT64_C(1000000000)), VINF_SUCCESS); 418 418 RTR0TESTR0_CHECK_RC(RTTimerStop(pTimer), VINF_SUCCESS); … … 421 421 422 422 /* Check some double starts and stops (shall not assert). */ 423 RT_ZERO(State); 423 RT_ZERO(State); ASMAtomicWriteU32(&State.cShots, State.cShots); 424 424 RTR0TESTR0_CHECK_RC(RTTimerStart(pTimer, 5*UINT64_C(1000000000)), VINF_SUCCESS); 425 425 RTR0TESTR0_CHECK_RC(RTTimerStart(pTimer, 0), VERR_TIMER_ACTIVE); … … 448 448 RT_ZERO(State); 449 449 State.iActionShot = 0; 450 ASMAtomicWriteU32(&State.cShots, State.cShots); 450 451 do /* break loop */ 451 452 { … … 476 477 State.rc = VERR_IPE_UNINITIALIZED_STATUS; 477 478 State.iActionShot = 0; 479 ASMAtomicWriteU32(&State.cShots, State.cShots); 478 480 do /* break loop */ 479 481 { … … 504 506 State.rc = VINF_SUCCESS; 505 507 State.u.Specific.idCpu = RTMpCpuIdFromSetIndex(iCpu); 508 ASMAtomicWriteU32(&State.cShots, State.cShots); 506 509 507 510 uint32_t fFlags = TSTRTR0TIMER_IS_HIRES(uOperation) ? RTTIMER_FLAGS_HIGH_RES : 0; … … 557 560 RT_ZERO(State); 558 561 State.fPeriodic = true; 562 ASMAtomicWriteU32(&State.cShots, State.cShots); 563 559 564 uint64_t uStartNsTS = RTTimeSystemNanoTS(); 560 565 RTR0TESTR0_CHECK_RC_BREAK(RTTimerStart(pTimer, u10HzAsNs), VINF_SUCCESS); … … 585 590 RT_ZERO(State); 586 591 State.fPeriodic = true; 592 ASMAtomicWriteU32(&State.cShots, State.cShots); /* ordered, necessary? */ 593 587 594 RTR0TESTR0_CHECK_RC_BREAK(RTTimerStart(pTimer, i < 20 ? 0 : cNsSysHz), VINF_SUCCESS); 588 595 for (uint32_t k = 0; k < 1000 && ASMAtomicUoReadU32(&State.cShots) < 2; k++) … … 621 628 RTR0TESTR0_CHECK_MSG_BREAK(State.u.ChgInt.cNsMinInterval > 1000, ("%u\n", State.u.ChgInt.cNsMinInterval)); 622 629 RTR0TESTR0_CHECK_MSG_BREAK(State.u.ChgInt.cNsMaxInterval > State.u.ChgInt.cNsMinInterval, ("max=%u min=%u\n", State.u.ChgInt.cNsMaxInterval, State.u.ChgInt.cNsMinInterval)); 630 ASMAtomicWriteU32(&State.cShots, State.cShots); 623 631 624 632 /* create the timer and check if RTTimerChangeInterval is supported. */ … … 664 672 State.fPeriodic = true; 665 673 State.u.Specific.idCpu = RTMpCpuIdFromSetIndex(iCpu); 674 ASMAtomicWriteU32(&State.cShots, State.cShots); 666 675 667 676 uint32_t fFlags = TSTRTR0TIMER_IS_HIRES(uOperation) ? RTTIMER_FLAGS_HIGH_RES : 0;
Note:
See TracChangeset
for help on using the changeset viewer.