aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
AgeCommit message (Collapse)Author
2020-02-11Core: Set all hardware emulation constants in a single file.Fernando Sahmkow
2019-11-26core_timing: Use better reference tracking for EventType. (#3159)bunnei
* core_timing: Use better reference tracking for EventType. - Moves ownership of the event to the caller, ensuring we don't fire events for destroyed objects. - Removes need for unique names - we won't be using this for save states anyways.
2019-10-12Core_Timing: Address Remaining feedback.Fernando Sahmkow
2019-10-11Core_Timing: Address Feedback and suppress warnings.Fernando Sahmkow
2019-10-09Core Timing: Correct Idle and remove lefting pragmaFernando Sahmkow
2019-10-09Core Timing: General corrections and added tests.Fernando Sahmkow
2019-10-09Core Timing: Rework Core Timing to run all cores evenly.Fernando Sahmkow
2019-06-16Core_Timing: Make core_timing threadsafe by default.Fernando Sahmkow
The old implementation had faulty Threadsafe methods where events could be missing. This implementation unifies unsafe/safe methods and makes core timing thread safe overall.
2019-03-24core/core_timing: Make callback parameters consistentLioncash
In some cases, our callbacks were using s64 as a parameter, and in other cases, they were using an int, which is inconsistent. To make all callbacks consistent, we can just use an s64 as the type for late cycles, given it gets rid of the need to cast internally. While we're at it, also resolve some signed/unsigned conversions that were occurring related to the callback registration.
2019-02-15core_timing: Convert core timing into a classLioncash
Gets rid of the largest set of mutable global state within the core. This also paves a way for eliminating usages of GetInstance() on the System class as a follow-up. Note that no behavioral changes have been made, and this simply extracts the functionality into a class. This also has the benefit of making dependencies on the core timing functionality explicit within the relevant interfaces.
2019-02-13Merge pull request #2115 from lioncash/localbunnei
core_timing: Make EmptyTimedCallback a local variable
2019-02-12threadsafe_queue: Remove NeedSize template parameterLioncash
The necessity of this parameter is dubious at best, and in 2019 probably offers completely negligible savings as opposed to just leaving this enabled. This removes it and simplifies the overall interface.
2019-02-12core_timing: Make EmptyTimedCallback a local variableLioncash
Given this is only used in one place, it can be moved closest to its usage site.
2019-02-12core_timing: Rename CoreTiming namespace to Core::TimingLioncash
Places all of the timing-related functionality under the existing Core namespace to keep things consistent, rather than having the timing utilities sitting in its own completely separate namespace.
2018-08-13Core::CoreTiming: add UnscheduleEventThreadsafeB3n30
2018-08-12Kernel/Thread: Always use the threadsafe option when scheduling wakeups.Subv
WakeAfterDelay might be called from any host thread, so err on the side of caution and use the thread-safe CoreTiming::ScheduleEventThreadsafe. Note that CoreTiming is still far from thread-safe, there may be more things we have to work on for it to be up to par with what we want.
2018-08-06Merge pull request #934 from lioncash/chronobunnei
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
2018-08-05core_timing: Make GetGlobalTimeUs() return std::chrono::microsecondsLioncash
Enforces the time unit being returned and also allows using the standard time utilities to manipulate it.
2018-08-05core_timing: Use transparent functors where applicableLioncash
Gets rid of the need to hardcode the type in multiple places. This will now be deduced automatically, based off the elements in the container being provided to the algorithm.
2018-07-24core_timing: Split off utility functions into core_timing_utilMerryMage
2018-07-02Rename logging macro back to LOG_*James Rowe
2018-05-03core_timing: Don't include the log header in core timing's headerLioncash
Avoids propagating logging macros and facilities to files that may not need them. This also allows hiding an internal constant.
2018-04-27general: Convert assertion macros over to be fmt-compatibleLioncash
2018-01-19Fixes some cast warnings, partial port of citra #3064 (#106)River City Ransomware
* Fixes some cast warnings, partially fixes citra #3064 * Converted casts to uint32_t to u32 * Ran clang-format
2018-01-08CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)B3n30
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-07core_timing: Increase clock speed for Switch docked.bunnei
2017-09-30Moved down_count to CoreTimingHuw Pascoe
2017-01-16CoreTiming: use named constant for ARM11 clock ratewwylele
2016-12-22core: Replace "AppCore" nomenclature with just "CPU".bunnei
2016-12-21core: Consolidate core and system state, remove system module & cleanups.bunnei
2016-09-21Use negative priorities to avoid special-casing the self-includeYuri Kunde Schlesner
2016-09-21Remove empty newlines in #include blocks.Emmanuel Gil Peyrot
This makes clang-format useful on those. Also add a bunch of forgotten transitive includes, which otherwise prevented compilation.
2016-09-18Manually tweak source formatting and then re-run clang-formatYuri Kunde Schlesner
2016-09-18Sources: Run clang-format on everything.Emmanuel Gil Peyrot
2015-09-16general: Silence some warnings when using clangLioncash
2015-09-11general: Replace 0 literals with nullptr where applicableLioncash
2015-07-19Core : Fix Conversion Warningszawata
2015-06-28Core: Cleanup core includes.Emmanuel Gil Peyrot
2015-06-28Common: Fix FileUtil includes, and everything relying on those.Emmanuel Gil Peyrot
2015-05-29Remove every trailing whitespace from the project (but externals).Emmanuel Gil Peyrot
2015-05-01CoreTiming: Initialize static variables at bootup.bunnei
2015-02-18Remove the useless msg_handler compilation unit that was left over from Dolphinarchshift
2015-02-17core/video_core: Use in-place construction where possibleLioncash
2015-02-14Merge pull request #529 from Subv/masterbunnei
Build: Fixed some warnings
2015-02-13core: Apply static to local functionsLioncash
2015-02-12Build: Fixed some warningsSubv
2015-02-10Asserts: break/crash program, fit to style guide; log.h->assert.harchshift
Involves making asserts use printf instead of the log functions (log functions are asynchronous and, as such, the log won't be printed in time) As such, the log type argument was removed (printf obviously can't use it, and it's made obsolete by the file and line printing) Also removed some GEKKO cruft.
2015-01-20core_timing: Mark several variables as staticLioncash
These are only used in this translation unit.
2015-01-09Move ThreadContext to core/core.h and deal with the falloutYuri Kunde Schlesner
2015-01-07CoreTiming: Ported the CoreTiming namespace from PPSSPPSubv
Implemented the required calls to make it work. CoreTiming: Added a new logging class Core_Timing.