mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 23:08:22 -04:00
ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
parent
e5b1739f65
commit
dd78ede99f
370 changed files with 2107 additions and 2107 deletions
|
@ -87,11 +87,11 @@ namespace ams::os::impl {
|
|||
|
||||
/* We mapped successfully. */
|
||||
*out = map_address;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
/* We failed to map. */
|
||||
return os::ResultOutOfAddressSpace();
|
||||
R_THROW(os::ResultOutOfAddressSpace());
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace ams::os::impl {
|
|||
R_TRY(impl::InterProcessEventImpl::Create(std::addressof(wh), std::addressof(rh)));
|
||||
|
||||
SetupInterProcessEventType(event, rh, true, wh, true, clear_mode);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void DestroyInterProcessEvent(InterProcessEventType *event) {
|
||||
|
|
|
@ -29,7 +29,7 @@ namespace ams::os::impl {
|
|||
|
||||
*out_write = wh;
|
||||
*out_read = rh;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void InterProcessEventHorizonImpl::Close(NativeHandle handle) {
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace ams::os::impl {
|
|||
R_TRY(svc::CreateIoRegion(std::addressof(handle), io_pool_handle, address, size, svc_mapping, svc_perm));
|
||||
|
||||
*out = handle;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result IoRegionImpl::MapIoRegion(void **out, NativeHandle handle, size_t size, MemoryPermission perm) {
|
||||
|
@ -69,7 +69,7 @@ namespace ams::os::impl {
|
|||
R_CONVERT(svc::ResultInvalidCurrentMemory, os::ResultInvalidCurrentMemoryState())
|
||||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
},
|
||||
[handle](uintptr_t map_address, size_t map_size) -> void {
|
||||
return IoRegionImpl::UnmapIoRegion(handle, reinterpret_cast<void *>(map_address), map_size);
|
||||
|
@ -78,7 +78,7 @@ namespace ams::os::impl {
|
|||
|
||||
/* Return the address we mapped at. */
|
||||
*out = reinterpret_cast<void *>(mapped_address);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void IoRegionImpl::UnmapIoRegion(NativeHandle handle, void *address, size_t size) {
|
||||
|
|
|
@ -36,7 +36,7 @@ namespace ams::os::impl {
|
|||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
*out_index = index;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result MultiWaitHorizonImpl::ReplyAndReceiveN(s32 *out_index, s32 num, NativeHandle arr[], s32 array_size, s64 ns, NativeHandle reply_target) {
|
||||
|
@ -52,20 +52,20 @@ namespace ams::os::impl {
|
|||
R_CATCH(svc::ResultSessionClosed) {
|
||||
if (index == -1) {
|
||||
*out_index = MultiWaitImpl::WaitInvalid;
|
||||
return os::ResultSessionClosedForReply();
|
||||
R_THROW(os::ResultSessionClosedForReply());
|
||||
} else {
|
||||
*out_index = index;
|
||||
return os::ResultSessionClosedForReceive();
|
||||
R_THROW(os::ResultSessionClosedForReceive());
|
||||
}
|
||||
}
|
||||
R_CATCH(svc::ResultReceiveListBroken) {
|
||||
*out_index = index;
|
||||
return os::ResultReceiveListBroken();
|
||||
R_THROW(os::ResultReceiveListBroken());
|
||||
}
|
||||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
*out_index = index;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void MultiWaitHorizonImpl::CancelWait() {
|
||||
|
|
|
@ -46,7 +46,7 @@ namespace ams::os::impl {
|
|||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
*out = handle;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void SharedMemoryImpl::Close(NativeHandle handle) {
|
||||
|
@ -65,7 +65,7 @@ namespace ams::os::impl {
|
|||
R_CONVERT(svc::ResultInvalidCurrentMemory, os::ResultInvalidCurrentMemoryState())
|
||||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
},
|
||||
[handle](uintptr_t map_address, size_t map_size) -> void {
|
||||
return SharedMemoryImpl::Unmap(handle, reinterpret_cast<void *>(map_address), map_size);
|
||||
|
@ -74,7 +74,7 @@ namespace ams::os::impl {
|
|||
|
||||
/* Return the address we mapped at. */
|
||||
*out = reinterpret_cast<void *>(mapped_address);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void SharedMemoryImpl::Unmap(NativeHandle handle, void *address, size_t size) {
|
||||
|
|
|
@ -101,11 +101,11 @@ namespace ams::os::impl {
|
|||
os::SleepThread(TimeSpan::FromMilliSeconds(10));
|
||||
continue;
|
||||
}
|
||||
return os::ResultOutOfResource();
|
||||
R_THROW(os::ResultOutOfResource());
|
||||
}
|
||||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@ namespace ams::os::impl {
|
|||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
*out = handle;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void TransferMemoryImpl::Close(NativeHandle handle) {
|
||||
|
@ -67,7 +67,7 @@ namespace ams::os::impl {
|
|||
R_CONVERT(svc::ResultInvalidCurrentMemory, os::ResultInvalidCurrentMemoryState())
|
||||
} R_END_TRY_CATCH_WITH_ABORT_UNLESS;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
},
|
||||
[handle](uintptr_t map_address, size_t map_size) -> void {
|
||||
return TransferMemoryImpl::Unmap(handle, reinterpret_cast<void *>(map_address), map_size);
|
||||
|
@ -76,7 +76,7 @@ namespace ams::os::impl {
|
|||
|
||||
/* Return the address we mapped at. */
|
||||
*out = reinterpret_cast<void *>(mapped_address);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void TransferMemoryImpl::Unmap(NativeHandle handle, void *address, size_t size) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue