aboutsummaryrefslogtreecommitdiff
path: root/src/core/core_timing.cpp
AgeCommit message (Collapse)Author
2022-04-23general: Convert source file copyright comments over to SPDXMorph
This formats all copyright comments according to SPDX formatting guidelines. Additionally, this resolves the remaining GPLv2 only licensed files by relicensing them to GPLv2.0-or-later.
2021-05-03core: Resolve misc cases of variable shadowingLioncash
Resolves shadowing warnings that aren't in a particularly large subsection of core. Brings us closer to turning -Wshadow into an error. All that remains now is for cases in the kernel (left untouched for now since a big change by bunnei is pending), and a few left over in the service code (will be tackled next).
2021-01-11core: hle: Add missing calls to MicroProfileOnThreadExit.bunnei
2020-10-20Revert "core: Fix clang build"bunnei
2020-10-17core: Fix clang buildLioncash
Recent changes to the build system that made more warnings be flagged as errors caused building via clang to break. Fixes #4795
2020-08-22core_timing: Remove unused headerLioncash
2020-08-22core_timing: Move clock initializer into constructor initializer listLioncash
Same behavior, minus unnecessary zeroing out of the pointer.
2020-08-22core_timing: Resolve sign conversion warningLioncash
This constant is only ever assigned to downcount, which is a s64, not a u64.
2020-07-27core_timing: Make use of uintptr_t to represent user_dataLioncash
Makes the interface future-proofed for supporting other platforms in the event we ever support platforms with differing pointer sizes. This way, we have a type in place that is always guaranteed to be able to represent a pointer exactly.
2020-07-15core_timing: Make TimedCallback take std::chrono::nanosecondsLioncash
Enforces our desired time units directly with a concrete type.
2020-07-15core_timing: Make use of std::chrono with ScheduleEventLioncash
2020-06-28core_timing,scheduler: Use std::scoped_lock when possibleReinUsesLisp
Simplifies the cognitive load of procedures using locks and makes locks safe against exceptions.
2020-06-27Core/Common: Address Feedback.Fernando Sahmkow
2020-06-27CoreTiming: Correct rebase bugs and other miscellaneous things.Fernando Sahmkow
2020-06-27General: Tune the priority of main emulation threads so they have higher ↵Fernando Sahmkow
priority than less important helper threads.
2020-06-27CoreTiming/CycleTimer: Correct Idling.Fernando Sahmkow
2020-06-27SingleCore: Use Cycle Timing instead of Host Timing.Fernando Sahmkow
2020-06-27SingleCore: Move Host Timing from a sepparate thread to main cpu thread.Fernando Sahmkow
2020-06-27General: Fix Stop functionFernando Sahmkow
2020-06-27Kernel: Corrections to Scheduling.Fernando Sahmkow
2020-06-27HostTiming: Pause the hardware clock on pause.Fernando Sahmkow
2020-06-27General: Setup yuzu threads' microprofile, naming and registry.Fernando Sahmkow
2020-06-27General: Recover Prometheus project from harddrive failure Fernando Sahmkow
This commit: Implements CPU Interrupts, Replaces Cycle Timing for Host Timing, Reworks the Kernel's Scheduler, Introduce Idle State and Suspended State, Recreates the bootmanager, Initializes Multicore system.
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