| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
starvation.
Ported from citra PR #3091
The delay specified here is from a Nintendo 3DS, and should be measured in a Nintendo Switch.
This change is enough to prevent Puyo Puyo Tetris's main thread starvation.
|
|
|
|
|
|
* CoreTiming: New CoreTiming; Add Test for CoreTiming
|
|
|
|
This is kinda crufty, but we need it for now to update guest state variables.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Conflicts:
# src/core/CMakeLists.txt
# src/core/arm/dynarmic/arm_dynarmic.cpp
# src/core/arm/dyncom/arm_dyncom.cpp
# src/core/hle/kernel/process.cpp
# src/core/hle/kernel/thread.cpp
# src/core/hle/kernel/thread.h
# src/core/hle/kernel/vm_manager.cpp
# src/core/loader/3dsx.cpp
# src/core/loader/elf.cpp
# src/core/loader/ncch.cpp
# src/core/memory.cpp
# src/core/memory.h
# src/core/memory_setup.h
|
|
|
|
Memory: Add overloads for ReadBlock and WriteBlock that operate on a specific process.
|
|
|
|
|
|
Kernel/Threads: When putting a thread to wait, specify a function to execute when it is awoken
|
|
|
|
when it is awoken.
This change makes for a clearer (less confusing) path of execution in the scheduler, now the code to execute when a thread awakes is closer to the code that puts the thread to sleep (WaitSynch1, WaitSynchN). It also allows us to implement the special wake up behavior of ReplyAndReceive without hacking up WaitObject::WakeupAllWaitingThreads.
If savestates are desired in the future, we can change this implementation to one similar to the CoreTiming event system, where we first register the callback functions at startup and assign their identifiers to the Thread callback variable instead of directly assigning a lambda to the wake up callback variable.
|
|
creating it.
Don't automatically assume that Thread::Create will only be called when the parent process is currently scheduled. This assumption will be broken when applets or system modules are loaded.
|
|
Don't expose Memory::current_page_table as a global.
|
|
Kernel/Memory: Give each process its own page table and allow switching the current page table upon reschedule
|
|
context switch from an idle thread into a thread in the same process.
We were unnecessarily clearing the cache when going from Process A -> Idle -> Process A, this caused extreme performance regressions.
|
|
|
|
a new process.
This is necessary for loading multiple processes at the same time.
The main thread will be automatically scheduled when necessary once the scheduler runs.
|
|
Replace it with std::move(result_val).Unwrap(), or Foo().Unwrap() in
case you already have an rvalue.
|
|
|
|
|
|
creating a thread and remove the priority clamping code.
|
|
priority clamping code from Thread::SetPriority.
|
|
Don't yield execution in SleepThread(0) if there are no available threads to run
|
|
Kernel: Removed the priority boost code for starved threads.
|
|
available threads to run.
With this we avoid an useless temporary deschedule of the current thread.
|
|
|
|
After hwtesting and reverse engineering the kernel, it was found that the CTROS scheduler performs no priority boosting for threads like this, although some other forms of scheduling priority-starved threads might take place.
For example, it was found that hardware interrupts might cause low-priority threads to run if the CPU is preempted in the middle of an SVC handler that deschedules the current (high priority) thread before scheduling it again.
|
|
|
|
the objects that a thread is waiting on.
|
|
WaitSynchronization1 and WaitSynchronizationN with wait_all = true.
This commit removes the overly general THREADSTATUS_WAIT_SYNCH and replaces it with two more granular statuses:
THREADSTATUS_WAIT_SYNCH_ANY when a thread waits on objects via WaitSynchronization1 or WaitSynchronizationN with wait_all = false.
THREADSTATUS_WAIT_SYNCH_ALL when a thread waits on objects via WaitSynchronizationN with wait_all = true.
|
|
the priority via mutexes
|
|
The implementation is based on reverse engineering of the 3DS's kernel.
A mutex holder's priority will be temporarily boosted to the best priority among any threads that want to acquire any of its held mutexes.
When the holder releases the mutex, it's priority will be boosted to the best priority among the threads that want to acquire any of its remaining held mutexes.
|
|
This will be useful when implementing mutex priority inheritance.
|
|
|