diff options
| author | 2014-11-19 15:24:46 -0500 | |
|---|---|---|
| committer | 2014-11-19 15:24:46 -0500 | |
| commit | c0cd0fa78edc37795176c6fb45a52c1d015f3690 (patch) | |
| tree | 237f15dd9d986309000c995fde07088625e62239 /src/core/core_timing.cpp | |
| parent | Merge pull request #208 from lioncash/statics (diff) | |
| parent | Remove tabs in all files except in skyeye imports and in generated GL code (diff) | |
| download | yuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.tar.gz yuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.tar.xz yuzu-c0cd0fa78edc37795176c6fb45a52c1d015f3690.zip | |
Merge pull request #211 from linkmauve/master
Remove trailing spaces from the entire project
Diffstat (limited to 'src/core/core_timing.cpp')
| -rw-r--r-- | src/core/core_timing.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/src/core/core_timing.cpp b/src/core/core_timing.cpp index 0116cb376..558c6cbf7 100644 --- a/src/core/core_timing.cpp +++ b/src/core/core_timing.cpp | |||
| @@ -41,7 +41,7 @@ struct BaseEvent | |||
| 41 | s64 time; | 41 | s64 time; |
| 42 | u64 userdata; | 42 | u64 userdata; |
| 43 | int type; | 43 | int type; |
| 44 | // Event *next; | 44 | // Event *next; |
| 45 | }; | 45 | }; |
| 46 | 46 | ||
| 47 | typedef LinkedListItem<BaseEvent> Event; | 47 | typedef LinkedListItem<BaseEvent> Event; |
| @@ -249,7 +249,7 @@ void AddEventToQueue(Event* ne) | |||
| 249 | 249 | ||
| 250 | // This must be run ONLY from within the cpu thread | 250 | // This must be run ONLY from within the cpu thread |
| 251 | // cyclesIntoFuture may be VERY inaccurate if called from anything else | 251 | // cyclesIntoFuture may be VERY inaccurate if called from anything else |
| 252 | // than Advance | 252 | // than Advance |
| 253 | void ScheduleEvent(s64 cyclesIntoFuture, int event_type, u64 userdata) | 253 | void ScheduleEvent(s64 cyclesIntoFuture, int event_type, u64 userdata) |
| 254 | { | 254 | { |
| 255 | Event *ne = GetNewEvent(); | 255 | Event *ne = GetNewEvent(); |
| @@ -469,8 +469,8 @@ void ProcessFifoWaitEvents() | |||
| 469 | { | 469 | { |
| 470 | if (first->time <= globalTimer) | 470 | if (first->time <= globalTimer) |
| 471 | { | 471 | { |
| 472 | // LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", | 472 | //LOG(TIMER, "[Scheduler] %s (%lld, %lld) ", |
| 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); | 473 | // first->name ? first->name : "?", (u64)globalTimer, (u64)first->time); |
| 474 | Event* evt = first; | 474 | Event* evt = first; |
| 475 | first = first->next; | 475 | first = first->next; |
| 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); | 476 | event_types[evt->type].callback(evt->userdata, (int)(globalTimer - evt->time)); |
| @@ -516,23 +516,23 @@ void Advance() | |||
| 516 | //currentMIPS->downcount = slicelength; | 516 | //currentMIPS->downcount = slicelength; |
| 517 | 517 | ||
| 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) | 518 | //if (Common::AtomicLoadAcquire(hasTsEvents)) |
| 519 | // MoveEvents(); | 519 | // MoveEvents(); |
| 520 | //ProcessFifoWaitEvents(); | 520 | //ProcessFifoWaitEvents(); |
| 521 | 521 | ||
| 522 | //if (!first) | 522 | //if (!first) |
| 523 | //{ | 523 | //{ |
| 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); | 524 | // // WARN_LOG(TIMER, "WARNING - no events in queue. Setting currentMIPS->downcount to 10000"); |
| 525 | // currentMIPS->downcount += 10000; | 525 | // currentMIPS->downcount += 10000; |
| 526 | //} | 526 | //} |
| 527 | //else | 527 | //else |
| 528 | //{ | 528 | //{ |
| 529 | // slicelength = (int)(first->time - globalTimer); | 529 | // slicelength = (int)(first->time - globalTimer); |
| 530 | // if (slicelength > MAX_SLICE_LENGTH) | 530 | // if (slicelength > MAX_SLICE_LENGTH) |
| 531 | // slicelength = MAX_SLICE_LENGTH; | 531 | // slicelength = MAX_SLICE_LENGTH; |
| 532 | // currentMIPS->downcount = slicelength; | 532 | // currentMIPS->downcount = slicelength; |
| 533 | //} | 533 | //} |
| 534 | //if (advanceCallback) | 534 | //if (advanceCallback) |
| 535 | // advanceCallback(cyclesExecuted); | 535 | // advanceCallback(cyclesExecuted); |
| 536 | } | 536 | } |
| 537 | 537 | ||
| 538 | void LogPendingEvents() | 538 | void LogPendingEvents() |
| @@ -550,20 +550,20 @@ void Idle(int maxIdle) | |||
| 550 | ERROR_LOG(TIME, "Unimplemented function!"); | 550 | ERROR_LOG(TIME, "Unimplemented function!"); |
| 551 | //int cyclesDown = currentMIPS->downcount; | 551 | //int cyclesDown = currentMIPS->downcount; |
| 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) | 552 | //if (maxIdle != 0 && cyclesDown > maxIdle) |
| 553 | // cyclesDown = maxIdle; | 553 | // cyclesDown = maxIdle; |
| 554 | 554 | ||
| 555 | //if (first && cyclesDown > 0) | 555 | //if (first && cyclesDown > 0) |
| 556 | //{ | 556 | //{ |
| 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; | 557 | // int cyclesExecuted = slicelength - currentMIPS->downcount; |
| 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); | 558 | // int cyclesNextEvent = (int) (first->time - globalTimer); |
| 559 | 559 | ||
| 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) | 560 | // if (cyclesNextEvent < cyclesExecuted + cyclesDown) |
| 561 | // { | 561 | // { |
| 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; | 562 | // cyclesDown = cyclesNextEvent - cyclesExecuted; |
| 563 | // // Now, now... no time machines, please. | 563 | // // Now, now... no time machines, please. |
| 564 | // if (cyclesDown < 0) | 564 | // if (cyclesDown < 0) |
| 565 | // cyclesDown = 0; | 565 | // cyclesDown = 0; |
| 566 | // } | 566 | // } |
| 567 | //} | 567 | //} |
| 568 | 568 | ||
| 569 | //INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f)); | 569 | //INFO_LOG(TIME, "Idle for %i cycles! (%f ms)", cyclesDown, cyclesDown / (float)(g_clock_rate_arm11 * 0.001f)); |
| @@ -571,7 +571,7 @@ void Idle(int maxIdle) | |||
| 571 | //idledCycles += cyclesDown; | 571 | //idledCycles += cyclesDown; |
| 572 | //currentMIPS->downcount -= cyclesDown; | 572 | //currentMIPS->downcount -= cyclesDown; |
| 573 | //if (currentMIPS->downcount == 0) | 573 | //if (currentMIPS->downcount == 0) |
| 574 | // currentMIPS->downcount = -1; | 574 | // currentMIPS->downcount = -1; |
| 575 | } | 575 | } |
| 576 | 576 | ||
| 577 | std::string GetScheduledEventsSummary() | 577 | std::string GetScheduledEventsSummary() |
| @@ -623,4 +623,4 @@ void DoState(PointerWrap &p) | |||
| 623 | p.Do(idledCycles); | 623 | p.Do(idledCycles); |
| 624 | } | 624 | } |
| 625 | 625 | ||
| 626 | } // namespace | 626 | } // namespace |