There was an error fetching the commit references. Please try again later.
Kernel/Threads: When putting a thread to wait, specify a function to execute 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.
Showing
- src/core/hle/kernel/thread.cpp 10 additions, 3 deletionssrc/core/hle/kernel/thread.cpp
- src/core/hle/kernel/thread.h 12 additions, 3 deletionssrc/core/hle/kernel/thread.h
- src/core/hle/kernel/wait_object.cpp 4 additions, 7 deletionssrc/core/hle/kernel/wait_object.cpp
- src/core/hle/svc.cpp 65 additions, 4 deletionssrc/core/hle/svc.cpp
Loading
Please register or sign in to comment