Commit graph

49 commits

Author SHA1 Message Date
ameerj
d27abf5546 core: Remove unused includes 2021-11-03 21:42:57 -04:00
bunnei
14d3f114a5 core: cpu_manager: Use jthread. 2021-09-03 19:05:41 -07:00
bunnei
5e600cba3a Revert "kernel: Various improvements to scheduler" 2021-08-25 20:59:28 -07:00
bunnei
b2f859f47c core: hle: kernel: Disable dispatch count tracking on single core.
- This would have limited value, and would be a mess to handle properly.
2021-08-14 02:14:19 -07:00
bunnei
79c64bf1ee core: cpu_manager: Use invalid core_id on init and simplify shutdown. 2021-08-07 12:33:07 -07:00
bunnei
62b84a3e96 core: cpu_manager: Use KScopedDisableDispatch. 2021-08-07 12:18:47 -07:00
bunnei
b0cb5c830c core: cpu_manager: Use jthread. 2021-08-07 12:18:47 -07:00
Lioncash
eeae5217ba core: Make variable shadowing a compile-time error
Now that we have most of core free of shadowing, we can enable the
warning as an error to catch anything that may be remaining and also
eliminate this class of logic bug entirely.
2021-05-16 03:43:16 -04:00
bunnei
e4b692bd16 common: Fiber: use a reference for YieldTo.
- Fixes another small leak.
2021-03-07 13:46:53 -08:00
bunnei
845a217d5e Revert "core: Switch to unique_ptr for usage of Common::Fiber." 2021-03-05 17:08:17 -08:00
bunnei
3322f10f84 core: Switch to unique_ptr for usage of Common::Fiber.
- With using unique_ptr instead of shared_ptr, we have more explicit ownership of the context.
- Fixes a memory leak due to circular reference of the shared pointer.
2021-02-27 11:56:04 -08:00
bunnei
f6ea864471 core: cpu_manager: Remove unused variable. 2021-01-28 21:42:26 -08:00
bunnei
f34dd04d09 hle: kernel: Recode implementation of KThread to be more accurate. 2021-01-28 21:42:26 -08:00
bunnei
d49e29d866 hle: kernel: Move single core "phantom mode" out of KThread.
- This is a workaround that does not belong in a kernel primitive.
2021-01-28 21:42:25 -08:00
bunnei
e74f682506 hle: kernel: KThread: Remove thread types that do not exist. 2021-01-28 21:42:25 -08:00
bunnei
3d70b4a4ea core: hle: kernel: Rename Thread to KThread. 2021-01-28 21:42:25 -08:00
bunnei
cf7a66a3cc core: cpu_manager: Fix a typo in PreemptSingleCore, which broke many games.
- We were reload'ing the old current scheduler, which may have changed.
2020-12-06 00:27:13 -08:00
bunnei
039844bbb9 hle: kernel: Rewrite scheduler implementation based on Mesopshere. 2020-12-06 00:03:24 -08:00
bunnei
aaffe73f47 hle: kernel: multicore: Replace n-JITs impl. with 4 JITs. 2020-11-29 01:31:51 -08:00
Lioncash
c06510376a core: Eliminate remaining usages of the global system instance
Removes all remaining usages of the global system instance. After this,
migration can begin to migrate to being constructed and managed entirely
by the various frontends.
2020-11-27 11:40:45 -05:00
bunnei
28843b094f core: cpu_manager: Fix shutdown crash when closing before emulation starts. 2020-11-24 15:25:39 -08:00
bunnei
321fbec267 core: cpu_manager: Add missing call to MicroProfileOnThreadExit().
- Fixes an occasional crash when trying to launch subsequent games.
2020-10-26 16:09:15 -07:00
LC
ce88bb3f00 Merge pull request #4461 from comex/thread-names
Fix thread naming on Linux, which limits names to 15 bytes.
2020-08-31 15:31:48 -04:00
Lioncash
beca7a0429 cpu_manager: Make use of ranged for where applicable
We can simplify a few loops by making use of ranged for.
2020-08-22 22:43:19 -04:00
comex
23523e4c0a Fix thread naming on Linux, which limits names to 15 bytes.
- In `SetCurrentThreadName`, when on Linux, truncate to 15 bytes, as (at
  least on glibc) `pthread_set_name_np` will otherwise return `ERANGE` and
  do nothing.
- Also, add logging in case `pthread_set_name_np` returns an error
  anyway.  This is Linux-specific, as the Apple and BSD versions of
  `pthread_set_name_np return `void`.
- Change the name for CPU threads in multi-core mode from
  "yuzu:CoreCPUThread_N" (19 bytes) to "yuzu:CPUCore_N" (14 bytes) so it
  fits into the Linux limit.  Some other thread names are also cut off,
  but I didn't bother addressing them as you can guess them from the
  truncated versions.  For a CPU thread, truncation means you can't see
  which core it is!
2020-08-05 20:34:49 -07:00
Lioncash
3c31a08802 cpu_manager: Remove redundant std::function declarations
We can just return the function directly. Making for less reading.
2020-07-27 21:57:05 -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
543b6b315f General: Correct rebase, sync gpu and context management. 2020-06-27 11:36:08 -04:00
Fernando Sahmkow
9f7adff3d3 SingleCore: Correct ticks reset to be on preemption. 2020-06-27 11:36:06 -04:00
Fernando Sahmkow
1146679de6 Bootmanager/CPU_Manager: Correct shader caches and sync GPU on OpenGL. 2020-06-27 11:36:03 -04:00
Fernando Sahmkow
4132ba96da SingleCore: Improve Cycle timing Behavior and replace mutex in global scheduler for spinlock. 2020-06-27 11:36:02 -04:00
Fernando Sahmkow
f0f2fc4243 SingleCore: Use Cycle Timing instead of Host Timing. 2020-06-27 11:36:01 -04:00
Fernando Sahmkow
db60ca2704 General: Move ARM_Interface into Threads. 2020-06-27 11:35:58 -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
1bcceea736 GUI: Make multicore only work with Async and add GUI for multicore. 2020-06-27 11:35:52 -04:00
Fernando Sahmkow
5f8acb6397 CPU_Manager: Correct stopping on SingleCore. 2020-06-27 11:35:49 -04:00
Fernando Sahmkow
b121009e03 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 2020-06-27 11:35:48 -04:00
Fernando Sahmkow
ebb640e968 CPU_Manager: Unload/Reload threads on preemption on SingleCore 2020-06-27 11:35:43 -04:00
Fernando Sahmkow
cc2f7dcd08 General: Initial Setup for Single Core. 2020-06-27 11:35:42 -04:00
Fernando Sahmkow
78eeea9f17 General: Add better safety for JIT use. 2020-06-27 11:35:20 -04:00
Fernando Sahmkow
7932cf9617 SVC: Correct races on physical core switching. 2020-06-27 11:35:19 -04:00
Fernando Sahmkow
64fe82af2e CPU_Manager: Reconfigre guest threads for dynamrmic downsides 2020-06-27 11:35:15 -04:00
Fernando Sahmkow
85ca7b2bdb SVC: Correct SendSyncRequest. 2020-06-27 11:35:14 -04:00
Fernando Sahmkow
9846f5822d General: Setup yuzu threads' microprofile, naming and registry. 2020-06-27 11:35:09 -04:00
Fernando Sahmkow
63bd59669f CPU_Manager: remove debugging code. 2020-06-27 11:35:08 -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
Lioncash
6bc28ed1c8 core/cpu_manager: Remove unused includes
Nothing from these headers are used within this source file, so we can
remove them.
2020-01-30 18:30:57 -05:00
Fernando Sahmkow
8eb175481c System: Address Feedback 2020-01-27 09:54:11 -04:00
Fernando Sahmkow
0a5e0d4777 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
Renamed from src/core/cpu_core_manager.cpp (Browse further)