Commit graph

71 commits

Author SHA1 Message Date
Fernando Sahmkow
94a51e6b21 Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow
a4e7d0b106 CoreTiming: Correct rebase bugs and other miscellaneous things. 2020-06-27 11:36:11 -04:00
Fernando Sahmkow
fb07639438 General: Tune the priority of main emulation threads so they have higher priority than less important helper threads. 2020-06-27 11:36:09 -04:00
Fernando Sahmkow
afb6d31c02 CoreTiming/CycleTimer: Correct Idling. 2020-06-27 11:36:07 -04:00
Fernando Sahmkow
f0f2fc4243 SingleCore: Use Cycle Timing instead of Host Timing. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow
287ea2d3b4 SingleCore: Move Host Timing from a sepparate thread to main cpu thread. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow
cb974be3ce General: Fix Stop function 2020-06-27 11:35:47 -04:00
Fernando Sahmkow
47c01e68da Kernel: Corrections to Scheduling. 2020-06-27 11:35:23 -04:00
Fernando Sahmkow
fb1d75a788 HostTiming: Pause the hardware clock on pause. 2020-06-27 11:35:10 -04:00
Fernando Sahmkow
9846f5822d General: Setup yuzu threads' microprofile, naming and registry. 2020-06-27 11:35:09 -04:00
Fernando Sahmkow
7ee76003ad General: Recover Prometheus project from harddrive failure
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-06-27 11:35:06 -04:00
Fernando Sahmkow
6fc0790f3a Core: Set all hardware emulation constants in a single file. 2020-02-11 20:19:11 -04:00
bunnei
8b35acbd29 core_timing: Use better reference tracking for EventType. (#3159)
* 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-11-26 21:48:56 -05:00
Fernando Sahmkow
b7d07d5a73 Core_Timing: Address Remaining feedback. 2019-10-12 07:26:38 -04:00
Fernando Sahmkow
97669469d0 Core_Timing: Address Feedback and suppress warnings. 2019-10-11 14:44:14 -04:00
Fernando Sahmkow
f2f4a797ee Core Timing: Correct Idle and remove lefting pragma 2019-10-09 12:30:33 -04:00
Fernando Sahmkow
e96ac0e2a3 Core Timing: General corrections and added tests. 2019-10-09 12:30:33 -04:00
Fernando Sahmkow
93a18da674 Core Timing: Rework Core Timing to run all cores evenly. 2019-10-09 12:30:31 -04:00
Fernando Sahmkow
16ee1b7006 Core_Timing: Make core_timing threadsafe by default.
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-06-16 14:14:35 -04:00
Lioncash
7739479e15 core/core_timing: Make callback parameters consistent
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-03-24 18:12:17 -04:00
Lioncash
1c3371c921 core_timing: Convert core timing into a class
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-15 21:50:25 -05:00
bunnei
cfb2483744 Merge pull request #2115 from lioncash/local
core_timing: Make EmptyTimedCallback a local variable
2019-02-13 21:42:04 -05:00
Lioncash
eb39267bc0 threadsafe_queue: Remove NeedSize template parameter
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-12 22:09:51 -05:00
Lioncash
8fd444d5a7 core_timing: Make EmptyTimedCallback a local variable
Given this is only used in one place, it can be moved closest to its
usage site.
2019-02-12 21:47:18 -05:00
Lioncash
1d2de5c4b5 core_timing: Rename CoreTiming namespace to Core::Timing
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.
2019-02-12 12:42:17 -05:00
B3n30
8d6b45cd43 Core::CoreTiming: add UnscheduleEventThreadsafe 2018-08-13 13:56:41 +02:00
Subv
cbf854666d Kernel/Thread: Always use the threadsafe option when scheduling wakeups.
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-12 18:40:56 -05:00
bunnei
51c6d09680 Merge pull request #934 from lioncash/chrono
core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
2018-08-06 18:03:05 -04:00
Lioncash
c34ee8cf08 core_timing: Make GetGlobalTimeUs() return std::chrono::microseconds
Enforces the time unit being returned and also allows using the standard
time utilities to manipulate it.
2018-08-05 22:07:30 -04:00
Lioncash
c03f854546 core_timing: Use transparent functors where applicable
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-08-05 21:19:24 -04:00
MerryMage
672d7dd573 core_timing: Split off utility functions into core_timing_util 2018-07-24 11:03:24 +01:00
James Rowe
e159c550d8 Rename logging macro back to LOG_* 2018-07-02 21:45:47 -04:00
Lioncash
2403aef8e9 core_timing: Don't include the log header in core timing's header
Avoids propagating logging macros and facilities to files that may not need them.
This also allows hiding an internal constant.
2018-05-03 08:00:15 -04:00
Lioncash
324ee31fc3 general: Convert assertion macros over to be fmt-compatible 2018-04-27 10:04:02 -04:00
River City Ransomware
39827d573a Fixes some cast warnings, partial port of citra #3064 (#106)
* Fixes some cast warnings, partially fixes citra #3064

* Converted casts to uint32_t to u32

* Ran clang-format
2018-01-19 18:01:41 -05:00
B3n30
1b2aa3780d CoreTiming: Reworked CoreTiming (cherry-picked from Citra #3119)
* CoreTiming: New CoreTiming; Add Test for CoreTiming
2018-01-08 19:10:25 -05:00
bunnei
1ae217c357 core_timing: Increase clock speed for Switch docked. 2018-01-07 00:58:06 -05:00
Huw Pascoe
ed9e0618c9 Moved down_count to CoreTiming 2017-09-30 17:38:14 +01:00
wwylele
34440c54a9 CoreTiming: use named constant for ARM11 clock rate 2017-01-16 09:59:16 +02:00
bunnei
8cfd0762fd core: Replace "AppCore" nomenclature with just "CPU". 2016-12-22 00:27:46 -05:00
bunnei
d504f6cf08 core: Consolidate core and system state, remove system module & cleanups. 2016-12-21 23:29:13 -05:00
Yuri Kunde Schlesner
fa5d9d8266 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot
1138ec0d49 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Yuri Kunde Schlesner
1e4a5da9f4 Manually tweak source formatting and then re-run clang-format 2016-09-18 21:14:25 -07:00
Emmanuel Gil Peyrot
628ed4376a Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Lioncash
08147474cb general: Silence some warnings when using clang 2015-09-16 08:51:53 -04:00
Lioncash
1ab765ff61 general: Replace 0 literals with nullptr where applicable 2015-09-11 23:11:01 -04:00
zawata
1be1ff23a9 Core : Fix Conversion Warnings 2015-07-19 03:59:47 -07:00
Emmanuel Gil Peyrot
aea15f5c73 Core: Cleanup core includes. 2015-06-28 00:36:54 +01:00
Emmanuel Gil Peyrot
8cf9eb7f43 Common: Fix FileUtil includes, and everything relying on those. 2015-06-28 00:36:53 +01:00