yuzu/src/core
Lioncash f2331a804a core/cpu_core_manager: Create threads separately from initialization.
Our initialization process is a little wonky than one would expect when
it comes to code flow. We initialize the CPU last, as opposed to
hardware, where the CPU obviously needs to be first, otherwise nothing
else would work, and we have code that adds checks to get around this.

For example, in the page table setting code, we check to see if the
system is turned on before we even notify the CPU instances of a page
table switch. This results in dead code (at the moment), because the
only time a page table switch will occur is when the system is *not*
running, preventing the emulated CPU instances from being notified of a
page table switch in a convenient manner (technically the code path
could be taken, but we don't emulate the process creation svc handlers
yet).

This moves the threads creation into its own member function of the core
manager and restores a little order (and predictability) to our
initialization process.

Previously, in the multi-threaded cases, we'd kick off several threads
before even the main kernel process was created and ready to execute (gross!).
Now the initialization process is like so:

Initialization:
  1. Timers

  2. CPU

  3. Kernel

  4. Filesystem stuff (kind of gross, but can be amended trivially)

  5. Applet stuff (ditto in terms of being kind of gross)

  6. Main process (will be moved into the loading step in a following
                   change)

  7. Telemetry (this should be initialized last in the future).

  8. Services (4 and 5 should ideally be alongside this).

  9. GDB (gross. Uses namespace scope state. Needs to be refactored into a
          class or booted altogether).

  10. Renderer

  11. GPU (will also have its threads created in a separate step in a
           following change).

Which... isn't *ideal* per-se, however getting rid of the wonky
intertwining of CPU state initialization out of this mix gets rid of
most of the footguns when it comes to our initialization process.
2019-04-11 22:11:40 -04:00
..
arm core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
crypto core: Port current uses of RegisteredCache to ContentProvider 2019-03-26 22:05:37 -04:00
file_sys Merge pull request #1957 from DarkLordZach/title-provider 2019-04-09 19:16:37 -04:00
frontend general: Use deducation guides for std::lock_guard and std::unique_lock 2019-04-01 12:53:47 -04:00
gdbstub gdbstub: Fix some bugs in IsMemoryBreak() and ServeBreak. Add workaround to let watchpoints break into GDB. (#4651) 2019-03-15 16:31:06 +01:00
hle core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
loader Merge pull request #1957 from DarkLordZach/title-provider 2019-04-09 19:16:37 -04:00
tracer Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
CMakeLists.txt core: Do not link LZ4 to core. Use common/data_compression for nso segment decompression instead. 2019-03-29 16:42:34 +01:00
core_cpu.cpp kernel/svc: Deglobalize the supervisor call handlers 2019-04-07 20:30:05 -04:00
core_cpu.h kernel/scheduler: Pass in system instance in constructor 2019-03-04 17:01:37 -05:00
core_timing_util.cpp Corrections, documenting and fixes. 2019-02-16 16:52:24 -04:00
core_timing_util.h Use u128 on Clock Cycles calculation. 2019-02-15 22:57:16 -04:00
core_timing.cpp core/core_timing: Make callback parameters consistent 2019-03-24 18:12:17 -04:00
core_timing.h core/core_timing: Make callback parameters consistent 2019-03-24 18:12:17 -04:00
core.cpp core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
core.h core: Store system-wide ContentProvider for the emulator 2019-03-26 22:05:37 -04:00
cpu_core_manager.cpp core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
cpu_core_manager.h core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
memory_setup.h core: Move PageTable struct into Common. 2019-03-16 22:05:40 -04:00
memory.cpp core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
memory.h core/cpu_core_manager: Create threads separately from initialization. 2019-04-11 22:11:40 -04:00
perf_stats.cpp general: Use deducation guides for std::lock_guard and std::unique_lock 2019-04-01 12:53:47 -04:00
perf_stats.h core/core: Replace includes with forward declarations where applicable 2018-08-31 16:30:14 -04:00
settings.cpp core/yuzu: Remove enable_nfc setting 2019-03-29 15:02:28 +01:00
settings.h core/yuzu: Remove enable_nfc setting 2019-03-29 15:02:28 +01:00
telemetry_session.cpp settings: Add new graphics setting for use_asynchronous_gpu_emulation. 2019-03-06 21:09:09 -05:00
telemetry_session.h compatdb: Use a seperate endpoint for testcase submission 2018-10-28 13:23:02 +01:00