|
|
@ -139,13 +139,14 @@ ResultCode Thread::Start() {
|
|
|
|
|
|
|
|
|
|
|
|
void Thread::CancelWait() {
|
|
|
|
void Thread::CancelWait() {
|
|
|
|
SchedulerLock lock(kernel);
|
|
|
|
SchedulerLock lock(kernel);
|
|
|
|
if (GetSchedulingStatus() != ThreadSchedStatus::Paused) {
|
|
|
|
if (GetSchedulingStatus() != ThreadSchedStatus::Paused || !is_waiting_on_sync) {
|
|
|
|
is_sync_cancelled = true;
|
|
|
|
is_sync_cancelled = true;
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//TODO(Blinkhawk): Implement cancel of server session
|
|
|
|
is_sync_cancelled = false;
|
|
|
|
is_sync_cancelled = false;
|
|
|
|
SetSynchronizationResults(nullptr, ERR_SYNCHRONIZATION_CANCELED);
|
|
|
|
SetSynchronizationResults(nullptr, ERR_SYNCHRONIZATION_CANCELED);
|
|
|
|
ResumeFromWait();
|
|
|
|
SetStatus(ThreadStatus::Ready);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void ResetThreadContext32(Core::ARM_Interface::ThreadContext32& context, u32 stack_top,
|
|
|
|
static void ResetThreadContext32(Core::ARM_Interface::ThreadContext32& context, u32 stack_top,
|
|
|
|