Commit graph

102 commits

Author SHA1 Message Date
bunnei e18ee8d681 hle: kernel: Port KAffinityMask from Mesosphere. 2020-12-06 00:03:24 -08:00
bunnei 4b9e1b6586 kernel: scheduler: Minor cleanup to remove duplicated code. 2020-11-29 01:31:52 -08:00
bunnei 7b642c7781 hle: kernel: multicore: Replace n-JITs impl. with 4 JITs. 2020-11-29 01:31:51 -08:00
bunnei 3d592972dc
Revert "core: Fix clang build" 2020-10-20 19:07:39 -07:00
Lioncash be1954e04c core: Fix clang build
Recent changes to the build system that made more warnings be flagged as
errors caused building via clang to break.

Fixes #4795
2020-10-17 19:50:39 -04:00
Lioncash 39c8d18feb core/CMakeLists: Make some warnings errors
Makes our error coverage a little more consistent across the board by
applying it to Linux side of things as well. This also makes it more
consistent with the warning settings in other libraries in the project.

This also updates httplib to 0.7.9, as there are several warning
cleanups made that allow us to enable several warnings as errors.
2020-10-13 13:16:49 -04:00
ReinUsesLisp ccdd84a778 hle/scheduler: Fix data race in is_context_switch_pending
As reported by tsan, SelectThreads could write to
is_context_switch_pending holding a mutex while SwitchToCurrent reads it
without holding any.

It is assumed that the author didn't want an atomic here, so the code is
reordered so that whenever is_context_switch_pending is read inside
SwitchToContext, the mutex is locked.
2020-08-26 02:56:05 +00:00
bunnei acfd771e79
Merge pull request #4491 from lioncash/unused-vars
kernel: Remove unused variables
2020-08-10 12:04:30 -04:00
Lioncash a10d64ea79 kernel: Remove unused variables
Resolves a few compiler warnings.
2020-08-05 15:19:48 -04:00
Lioncash 9893da8e2c scheduler: Resolve sign conversion warning 2020-08-05 15:12:29 -04:00
Lioncash f0125b2be8 cpu_manager: Mark function getters as static
All these do are return std::function instances of static functions, so
these can be used without an instance of the CPU manager.
2020-07-16 13:30:56 -04:00
ReinUsesLisp 8562b516c0 core_timing,scheduler: Use std::scoped_lock when possible
Simplifies the cognitive load of procedures using locks and makes locks
safe against exceptions.
2020-06-28 21:42:57 -03:00
Fernando Sahmkow 2f8947583f Core/Common: Address Feedback. 2020-06-27 18:20:06 -04:00
Fernando Sahmkow d240143588 Kernel: Correct Host Context on Threads and Scheduler. 2020-06-27 11:36:15 -04:00
Fernando Sahmkow 9bde28d7b1 Scheduler: Correct Reload/Unload 2020-06-27 11:35:59 -04:00
Fernando Sahmkow 5974e3ea33 Thread: Release the ARM Interface on exitting. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow 1567824d2d General: Move ARM_Interface into Threads. 2020-06-27 11:35:58 -04:00
Fernando Sahmkow db68fba4a6 Scheduler: Correct yielding interaction with SetThreadActivity. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow 7020d498c5 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 2020-06-27 11:35:48 -04:00
Fernando Sahmkow f370de84b1 Kernel: Rewind on SVC change. 2020-06-27 11:35:46 -04:00
Fernando Sahmkow a439cdf22e CPU_Manager: Unload/Reload threads on preemption on SingleCore 2020-06-27 11:35:43 -04:00
Fernando Sahmkow 391f5f360d Scheduler: Set last running time on thread. 2020-06-27 11:35:41 -04:00
Fernando Sahmkow 9e9c287f8b Kernel: Corrections to TimeManager, Scheduler and Mutex. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 6515c6e8c6 Kernel: Fixes, corrections and asserts to scheduler and different svcs. 2020-06-27 11:35:40 -04:00
Fernando Sahmkow 4217e58a10 Scheduler: Correct yields. 2020-06-27 11:35:39 -04:00
Fernando Sahmkow 725bac1404 Scheduler: Remove arm_interface lock and a few corrections. 2020-06-27 11:35:35 -04:00
Fernando Sahmkow 83c7ba1ef7 SVC: Correct SetThreadActivity. 2020-06-27 11:35:33 -04:00
Fernando Sahmkow 44cb9997b3 Scheduler: Correct locking for hle threads. 2020-06-27 11:35:32 -04:00
Fernando Sahmkow 6ed28e15fa Scheduler: Fix HLE Threads on guard 2020-06-27 11:35:31 -04:00
Fernando Sahmkow 3de33348e4 Scheduler: Protect on closed threads. 2020-06-27 11:35:31 -04:00
Fernando Sahmkow 19847d4d42 Scheduler: Correct assert. 2020-06-27 11:35:30 -04:00
Fernando Sahmkow a33fbaddec Core: Correct rebase. 2020-06-27 11:35:29 -04:00
Fernando Sahmkow 1c672128c4 Scheduler: Release old thread fiber before trying to switch to the next thread fiber. 2020-06-27 11:35:28 -04:00
Fernando Sahmkow 1e987dbe8d Scheduler: Correct Select Threads Step 2. 2020-06-27 11:35:24 -04:00
Fernando Sahmkow 07993ac8c8 Kernel: Corrections to Scheduling. 2020-06-27 11:35:23 -04:00
Fernando Sahmkow 2a8837ff51 General: Add Asserts 2020-06-27 11:35:21 -04:00
Fernando Sahmkow 04e0f8776c General: Add better safety for JIT use. 2020-06-27 11:35:20 -04:00
Fernando Sahmkow d4ebb510a0 SVC: Correct WaitSynchronization, WaitProcessWideKey, SignalProcessWideKey. 2020-06-27 11:35:17 -04:00
Fernando Sahmkow 15a79eb0d7 SVC: Correct SendSyncRequest. 2020-06-27 11:35:14 -04:00
Fernando Sahmkow e31425df38 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
bunnei c083ea7d78 core: Implement separate A32/A64 ARM interfaces. 2020-03-02 21:51:57 -05:00
Fernando Sahmkow 3d0a2375ca Scheduler: Inline global scheduler in Scheduler Lock. 2020-02-22 12:39:17 -04:00
Fernando Sahmkow a1bf353780 Kernel: Correct pending feedback. 2020-02-22 11:51:03 -04:00
Fernando Sahmkow d219a96cc8 Kernel: Address Feedback. 2020-02-22 11:18:07 -04:00
Fernando Sahmkow ea956c823e Kernel: Implement Scheduler locks 2020-02-22 11:18:07 -04:00
Fernando Sahmkow 0728dfef84 Kernel: Make global scheduler depend on KernelCore 2020-02-22 11:18:06 -04:00
Fernando Sahmkow 2bc949628d Core: Address Feedback 2020-02-13 19:10:33 -04:00
Fernando Sahmkow 1e6f8aba04 Core: Set all hardware emulation constants in a single file. 2020-02-11 20:19:11 -04:00
Fernando Sahmkow e4a1ead897 Core: Refactor CpuCoreManager to CpuManager and Cpu to Core Manager.
This commit instends on better naming the new purpose of this classes.
2020-01-26 14:07:22 -04:00
Fernando Sahmkow 40cd4df584 CpuCore: Clear exclusive state after doing a run in dynarmic.
This commit corrects an error in which a Core could remain with an
exclusive state after running, leaving space for possible race
conditions between changing cores.
2019-12-05 18:08:59 -04:00