mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-07-21 09:55:45 +00:00
kernel/svc: Migrate svcCancelSynchronization behavior to a thread function
The actual behavior of this function is slightly more complex than what we're currently doing within the supervisor call. To avoid dumping most of this behavior in the supervisor call itself, we can migrate this to another function.
This commit is contained in:
parent
d4b42f6bc6
commit
4be897daa0
3 changed files with 17 additions and 7 deletions
|
@ -142,6 +142,12 @@ void Thread::ResumeFromWait() {
|
|||
ChangeScheduler();
|
||||
}
|
||||
|
||||
void Thread::CancelWait() {
|
||||
ASSERT(GetStatus() == ThreadStatus::WaitSynchAny);
|
||||
SetWaitSynchronizationResult(ERR_SYNCHRONIZATION_CANCELED);
|
||||
ResumeFromWait();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets a thread context, making it ready to be scheduled and run by the CPU
|
||||
* @param context Thread context to reset
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue