mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-13 22:54:24 -04:00
Integrate new result macros. (#1780)
* result: try out some experimental shenanigans * result: sketch out some more shenanigans * result: see what it looks like to convert kernel to use result conds instead of guards * make rest of kernel use experimental new macro-ing
This commit is contained in:
parent
375ba615be
commit
96f95b9f95
109 changed files with 1355 additions and 1380 deletions
|
@ -61,7 +61,7 @@ namespace ams::kern {
|
|||
/* Check that the thread isn't terminating. */
|
||||
if (cur_thread->IsTerminationRequested()) {
|
||||
slp.CancelSleep();
|
||||
return svc::ResultTerminationRequested();
|
||||
R_THROW(svc::ResultTerminationRequested());
|
||||
}
|
||||
|
||||
/* Handle the case where timeout is non-negative/infinite. */
|
||||
|
@ -69,7 +69,7 @@ namespace ams::kern {
|
|||
/* Check if we're already waiting. */
|
||||
if (m_next_thread != nullptr) {
|
||||
slp.CancelSleep();
|
||||
return svc::ResultBusy();
|
||||
R_THROW(svc::ResultBusy());
|
||||
}
|
||||
|
||||
/* If timeout is zero, handle the special case by canceling all waiting threads. */
|
||||
|
@ -79,7 +79,7 @@ namespace ams::kern {
|
|||
}
|
||||
|
||||
slp.CancelSleep();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ namespace ams::kern {
|
|||
cur_thread->BeginWait(std::addressof(wait_queue));
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue