mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-07 14:45:41 +12:00
[Kernel::WaitSync1] Instant timeout if ns == 0
This commit is contained in:
parent
2b492a435e
commit
920fd4cf0d
2 changed files with 9 additions and 0 deletions
|
@ -23,6 +23,9 @@ namespace SVCResult {
|
|||
|
||||
BadThreadPriority = 0xE0E01BFD,
|
||||
PortNameTooLong = 0xE0E0181E,
|
||||
|
||||
// Returned when a thread stops waiting due to timing out
|
||||
Timeout = 0x9401BFE,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
@ -103,6 +103,12 @@ void Kernel::waitSynchronization1() {
|
|||
if (!shouldWaitOnObject(object)) {
|
||||
regs[0] = SVCResult::Success;
|
||||
} else {
|
||||
// Timeout is 0, don't bother waiting, instantly timeout
|
||||
if (ns == 0) {
|
||||
regs[0] = SVCResult::Timeout;
|
||||
return;
|
||||
}
|
||||
|
||||
regs[0] = SVCResult::Success;
|
||||
|
||||
auto& t = threads[currentThreadIndex];
|
||||
|
|
Loading…
Add table
Reference in a new issue