Commit Graph

197 Commits (cdd14b03e5c8e29bc6cd11bbde0ef726d2f166ce)

Author SHA1 Message Date
bunnei cdd14b03e5 hle: kernel: Recode implementation of KThread to be more accurate. 4 years ago
bunnei 1f99f5473c kernel: k_light_lock: Simplify EmuThreadHandle implementation. 4 years ago
bunnei 0530292b97 hle: kernel: KThread: Fix ThreadType definition. 4 years ago
bunnei 4782985013 hle: kernel: Move single core "phantom mode" out of KThread.
- This is a workaround that does not belong in a kernel primitive.
4 years ago
bunnei eea346ba8e hle: kernel: KThread: Remove thread types that do not exist. 4 years ago
bunnei c0d3aef28c core: hle: kernel: Rename Thread to KThread. 4 years ago
bunnei 03dfc8d8e7 hle: kernel: thread: Preserve thread wait reason for debugging only.
- This is decoupled from core functionality and used for debugging only.
4 years ago
bunnei d1309fb275 hle: kernel: Rename thread "status" to "state". 4 years ago
bunnei c3c43e32fc hle: kernel: thread: Replace ThreadStatus/ThreadSchedStatus with a single ThreadState.
- This is how the real kernel works, and is more accurate and simpler.
4 years ago
bunnei 35c3c078e3 core: hle: kernel: Update KSynchronizationObject. 4 years ago
bunnei a2a0f5318d hle: kernel: Manage service threads on another thread.
- This is to allow service threads to defer destruction of themselves.
4 years ago
bunnei c192da3f82 hle: kernel: Manage host thread IDs using TLS.
- Avoids the need to have a large map of host to guest thread IDs.
4 years ago
bunnei dfdac7d38a hle: kernel: Move ServiceThread ownership to KernelCore.
- Fixes a circular dependency which prevented threads from being released on shutdown.
4 years ago
bunnei d0649d0971 core: hle: kernel: Clear process list on boot. 4 years ago
bunnei 6d2f9428c5 core: kernel: Clear process list earlier. 4 years ago
bunnei 28281ae250 core: hle: server_session: Use separate threads for each service connection. 4 years ago
bunnei ccce6cb3be hle: kernel: Migrate to KScopedSchedulerLock. 4 years ago
bunnei 9e29e36a78 hle: kernel: Rewrite scheduler implementation based on Mesopshere. 4 years ago
bunnei 63fd1bb503 core: arm: Implement InvalidateCacheRange for CPU cache invalidation. 4 years ago
bunnei c042a89113 common: fiber: Use boost::context instead of native fibers on Windows. 4 years ago
bunnei 7b642c7781 hle: kernel: multicore: Replace n-JITs impl. with 4 JITs. 4 years ago
ReinUsesLisp ce69ff2890 hle/kernel: Remove unused registered_core_threads to fix data races
This member was only used on asserts and it triggered data races.
Remove it to fix them.
5 years ago
bunnei 3d592972dc
Revert "core: Fix clang build" 5 years ago
Lioncash fdd9154069 kernel: Fix build with recent compiler flag changes
This slipped through the cracks due to another change being merged
before the compiler flag changes.
5 years ago
LC 88d5140cf2
Merge pull request #4796 from lioncash/clang
core: Fix clang build
5 years ago
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
5 years ago
ReinUsesLisp b9a9b83bee kernel: Implement host thread register methods without locking
Locks on GetCurrentHostThreadID were causing performance issues
according to Visual Studio's profiler. It was consuming twice the time
as arm_interface.Run(). The cost was not in the function itself but in
the lockinig it required.

Reimplement these functions using atomics and static storage instead of
an unordered_map. This is a side effect to avoid locking and using linked
lists for reads.

Replace unordered_map with a linear search.
5 years ago
ReinUsesLisp 36eade7f4c hle/kernel: Fix data race in GetCurrentHostThreadID
As reported by tsan, host_thread_ids could be read while
any of the RegisterHostThread variants were called.

To fix this, lock the register mutex when yuzu is running in multicore
mode and GetCurrentHostThreadID is called.
5 years ago
Lioncash a7af349dae core_timing: Make use of uintptr_t to represent user_data
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.
5 years ago
bunnei 4a8cb9a706
Merge pull request #4348 from lioncash/nano
core_timing: Make usage of nanoseconds more consistent in the interface
5 years ago
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.
5 years ago
Lioncash bef1844a51 core_timing: Make TimedCallback take std::chrono::nanoseconds
Enforces our desired time units directly with a concrete type.
5 years ago
Lioncash 8b50c660df core_timing: Make use of std::chrono with ScheduleEvent 5 years ago
Lioncash 52e83f0d5c kernel/handle_table: Remove usages of the global system instance
Removes even more usages of the global system instance, trimming away
more dependencies on global variables and making them explicit in the
interface.
5 years ago
Fernando Sahmkow 2f8947583f Core/Common: Address Feedback. 5 years ago
Fernando Sahmkow 48fa3b7a0f General: Cleanup legacy code. 5 years ago
Fernando Sahmkow c8bf47dcfb Kernel/svcBreak: Implement CacheInvalidation for Singlecore and correct svcBreak. 5 years ago
Fernando Sahmkow 9bde28d7b1 Scheduler: Correct Reload/Unload 5 years ago
Fernando Sahmkow 1567824d2d General: Move ARM_Interface into Threads. 5 years ago
Fernando Sahmkow 1b82ccec22 Core: Refactor ARM Interface. 5 years ago
Fernando Sahmkow f2ade343e2 SingleCore: Move Host Timing from a sepparate thread to main cpu thread. 5 years ago
Fernando Sahmkow 7020d498c5 General: Fix microprofile on dynarmic/svc, fix wait tree showing which threads were running. 5 years ago
Fernando Sahmkow e6f8bde74b General: Fix Stop function 5 years ago
Fernando Sahmkow d494b074e8 Kernel: Preempt Single core on redudant yields. 5 years ago
Fernando Sahmkow ab9aae28bf General: Initial Setup for Single Core. 5 years ago
Fernando Sahmkow 6515c6e8c6 Kernel: Fixes, corrections and asserts to scheduler and different svcs. 5 years ago
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.
5 years ago
bunnei fc61cb44ee kernel: resource_limit: Reserve physical memory. 5 years ago
bunnei 8f75524e55 kernel: Initialize memory layout for new VMM. 5 years ago
Lioncash 213fff67bc CMakeLists: Make -Wreorder a compile-time error
This can result in silent logic bugs within code, and given the amount
of times these kind of warnings are caused, they should be flagged at
compile-time so no new code is submitted with them.
5 years ago