| Age | Commit message (Collapse) | Author |
|
26de4bb521b1ace7af76eff4f6956cb23ac0d58c
This amends cases where crashes can occur that were missed due to the
odd way the previous code was set up (using 3DS memory regions that
don't exist).
|
|
General moving to keep kernel object types separate from the direct
kernel code. Also essentially a preliminary cleanup before eliminating
global kernel state in the kernel code.
|
|
Given there's no implementation, we may as well remove the code
entirely.
|
|
Removes unnecessary direct dependencies in some headers and also gets
rid of indirect dependencies that were being relied on to be included.
|
|
CPU: Save and restore the TPIDR_EL0 system register on every context switch
|
|
Note that there's currently a dynarmic bug preventing this register from being written.
|
|
Makes the thread status strongly typed, so implicit conversions can't
happen. It also makes it easier to catch mistakes at compile time.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Verified with a hwtest and implemented based on reverse engineering.
Thread A's priority will get bumped to the highest priority among all the threads that are waiting for a mutex that A holds.
Once A releases the mutex and ownership is transferred to B, A's priority will return to normal and B's priority will be bumped.
|
|
|
|
|
|
|
|
Switch mutexes are no longer kernel objects, they are managed in userland and only use the kernel to handle the contention case.
Mutex addresses store a special flag value (0x40000000) to notify the guest code that there are still some threads waiting for the mutex to be released. This flag is updated when a thread calls ArbitrateUnlock.
TODO:
* Fix svcWaitProcessWideKey
* Fix svcSignalProcessWideKey
* Remove the Mutex class.
|
|
|
|
|
|
|
|
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.
|
|
svcGetInfo(AllowedCpuIdBitmask)
|
|
|
|
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.
|
|
Now that HandleTable doesn't directly depend on WaitObject anymore, this
can be separated from the main kernel.h header.
|
|
|
|
|
|
Don't yield execution in SleepThread(0) if there are no available threads to run
|
|
available threads to run.
With this we avoid an useless temporary deschedule of the current thread.
|
|
|
|
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
|
|
This will be useful when implementing mutex priority inheritance.
|
|
|
|
|
|
|