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:
@@ -120,7 +120,7 @@ namespace ams::kern {
|
||||
/* NOTE: Nintendo returns GetCurrentThread().GetWaitResult() here. */
|
||||
/* This is technically incorrect, although it doesn't cause problems in practice */
|
||||
/* because this is only ever called with request_thread = GetCurrentThreadPointer(). */
|
||||
return request_thread->GetWaitResult();
|
||||
R_RETURN(request_thread->GetWaitResult());
|
||||
}
|
||||
|
||||
Result KLightServerSession::ReplyAndReceive(u32 *data) {
|
||||
@@ -193,7 +193,7 @@ namespace ams::kern {
|
||||
std::memcpy(GetCurrentThread().GetLightSessionData(), m_current_request->GetLightSessionData(), KLightSession::DataSize);
|
||||
|
||||
/* We successfully received. */
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
/* We need to wait for a request to come in. */
|
||||
@@ -201,7 +201,7 @@ namespace ams::kern {
|
||||
/* Check if we were cancelled. */
|
||||
if (GetCurrentThread().IsWaitCancelled()) {
|
||||
GetCurrentThread().ClearWaitCancelled();
|
||||
return svc::ResultCancelled();
|
||||
R_THROW(svc::ResultCancelled());
|
||||
}
|
||||
|
||||
/* Mark ourselves as cancellable. */
|
||||
|
||||
Reference in New Issue
Block a user