| Age | Commit message (Collapse) | Author |
|
interface
This allows for better compiler errors, where the compiler will state a
copy or move couldn't occur due to the relevant function being deleted.
Previously a compiler would warn about the relevant function not being
accessible (which, while true, isn't as informative as it could be).
|
|
Used by Espgaluda II
|
|
that has migrated.
- Previously, it was possible for a thread migration to occur from core A to core B.
- Next, core B waits on a guest lock that must be released by a thread queued for core A.
- Meanwhile, core A is still waiting on the core B's current thread lock - resulting in a deadlock.
- Fix this by try-locking the thread lock.
- Fixes softlocks in FF8 and Pokemon Legends Arceus.
|
|
Kernel Memory Updates (Part 4): Improve Un/MapPages, and more.
|
|
kernel/k_affinity_mask: Remove duplicated assert
|
|
This is already checked inside GetCoreBit()
|
|
- Previously implementation was incorrect, and would occasionally underflow.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- But do not enter the priority queue, as otherwise they will be scheduled.
- Allows dummy threads to use guest synchronization primitives.
|
|
- These are already tracked by kernel's registered_objects member.
|
|
nullptr.
|
|
scheduled.
|
|
thread exit.
|
|
- This does not appear to be necessary anymore.
|
|
- Considering is_thread_waiting is never set, so we can remove IsThreadWaiting.
- KThread::EndWait will take the scheduler lock, so we can remove the redundant lock.
|
|
- These are only used by host threads for locking and will never have a wait_queue.
|
|
- These are only used by host threads for locking.
|
|
- This will be used to ensure that we do not schedule dummy threads.
|
|
Kernel Memory Updates (Part 3): Clear KMemoryManager pages & other fixes
|
|
Accurately implement thread exit
|
|
Found by static analysis with PVS-Studio. Nobody seems to really know what was it doing there.
|
|
- Heap pages should be zero'd.
- Also explicitly passed along heap allocation option.
|
|
DoWorkerTaskImpl.
- This is used to terminate a thread asynchronously after it has been exited.
- This fixes a crash that can occur in Pokemon Sword/Shield because a thread is incorrectly closed on svcExitThread, then, the thread is destroyed on svcCloseHandle while it is still scheduled.
- Instead, we now wait for the thread to no longer be scheduled on all cores before destroying it from KWorkerTaskManager, which is accurate to HOS behavior.
|
|
unimplemented DoWorkerTaskImpl.
|
|
- This makes our implementations of these more closely match HOS.
|
|
|
|
- These primitives are used to dispatch asynchronous kernel tasks from KThread and KProcess.
|
|
- PR #7699 attempted to fix CreateServiceThread and ReleaseServiceThread to be thread safe, but inadvertently introduced a possible dead-lock.
- With this PR, we use a worker thread to manage the service thread list, allowing it only to be accessed by a single thread, and guaranteeing threads will not destroy themselves.
- Fixes a rare crash in Pokemon Sword/Shield, I've now run this game for ~12 hours non-stop and am quite confident this is a good solution for this issue.
|
|
hle: kernel: Fix service_threads access to be thread safe.
|
|
- CreateServiceThread and ReleaseServiceThread can be accessed by different threads, uses a lock to make this thread safe.
- Fixes a rare crash in Pokemon Sword/Shield that can occur when a new service thread is being created while an old one is being destroyed.
|
|
|
|
|
|
|
|
|
|
|
|
- We largely had the mechanics in place for thread pinning, this change hooks these up.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_thread_pinning.cpp.
|
|
- Updates our svcSetHeapSize with latest HOS, furthermore allowing heap size to properly be extended/shrunk.
- Validated with tests https://github.com/Atmosphere-NX/Atmosphere/blob/master/tests/TestSvc/source/test_set_heap_size.cpp.
|
|
core: hle: kernel: Implement SetMemoryPermission.
|
|
- Not seen in any games yet, but validated with kernel tests.
|
|
- This was added with firmware 11.0.0 (https://switchbrew.org/wiki/11.0.0).
- X18 is OR'd by kernel with 1, to make sure it is odd.
|
|
- Enforce tha the supplied handle is invalid, not valid.
- This gets Witcher 3 booting.
|