ams: use R_SUCCEED, R_THROW globally
This commit is contained in:
@@ -110,10 +110,10 @@ namespace ams::htclow::ctrl {
|
||||
R_UNLESS(header.body_size <= sizeof(HtcctrlPacketBody), htclow::ResultProtocolError());
|
||||
break;
|
||||
default:
|
||||
return htclow::ResultProtocolError();
|
||||
R_THROW(htclow::ResultProtocolError());
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceivePacket(const HtcctrlPacketHeader &header, const void *body, size_t body_size) {
|
||||
@@ -151,7 +151,7 @@ namespace ams::htclow::ctrl {
|
||||
/* Signal our event. */
|
||||
m_event.Signal();
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveReadyPacket(const void *body, size_t body_size) {
|
||||
@@ -174,7 +174,7 @@ namespace ams::htclow::ctrl {
|
||||
|
||||
/* Ready ourselves. */
|
||||
this->TryReadyInternal();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveSuspendPacket() {
|
||||
@@ -184,7 +184,7 @@ namespace ams::htclow::ctrl {
|
||||
return this->ProcessReceiveUnexpectedPacket();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveResumePacket() {
|
||||
@@ -194,14 +194,14 @@ namespace ams::htclow::ctrl {
|
||||
return this->ProcessReceiveUnexpectedPacket();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveDisconnectPacket() {
|
||||
/* Set our state. */
|
||||
R_TRY(this->SetState(HtcctrlState_Disconnected));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveBeaconQueryPacket() {
|
||||
@@ -211,7 +211,7 @@ namespace ams::htclow::ctrl {
|
||||
/* Signal our event. */
|
||||
m_event.Signal();
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::ProcessReceiveUnexpectedPacket() {
|
||||
@@ -225,7 +225,7 @@ namespace ams::htclow::ctrl {
|
||||
m_event.Signal();
|
||||
|
||||
/* Return unexpected packet error. */
|
||||
return htclow::ResultHtcctrlReceiveUnexpectedPacket();
|
||||
R_THROW(htclow::ResultHtcctrlReceiveUnexpectedPacket());
|
||||
}
|
||||
|
||||
void HtcctrlService::ProcessSendConnectPacket() {
|
||||
@@ -446,7 +446,7 @@ namespace ams::htclow::ctrl {
|
||||
R_TRY(this->SetState(HtcctrlState_DriverConnected));
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::NotifyDriverDisconnected() {
|
||||
@@ -459,7 +459,7 @@ namespace ams::htclow::ctrl {
|
||||
R_TRY(this->SetState(HtcctrlState_DriverDisconnected));
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtcctrlService::SetState(HtcctrlState state) {
|
||||
@@ -472,7 +472,7 @@ namespace ams::htclow::ctrl {
|
||||
this->ReflectState();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void HtcctrlService::ReflectState() {
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ams::htclow::ctrl {
|
||||
|
||||
/* Note whether we transitioned. */
|
||||
*out_transitioned = state != old_state;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool HtcctrlStateMachine::IsInformationNeeded() {
|
||||
|
||||
@@ -43,15 +43,15 @@ namespace ams::htclow::driver {
|
||||
//m_plain_channel_driver.Open();
|
||||
//m_open_driver = std::addressof(m_plain_channel_driver);
|
||||
//break;
|
||||
return htclow::ResultUnknownDriverType();
|
||||
R_THROW(htclow::ResultUnknownDriverType());
|
||||
default:
|
||||
return htclow::ResultUnknownDriverType();
|
||||
R_THROW(htclow::ResultUnknownDriverType());
|
||||
}
|
||||
|
||||
/* Set the driver type. */
|
||||
m_driver_type = driver_type;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void DriverManager::CloseDriver() {
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
/* This can never happen, as the above loop should be infinite, but completion logic is here for posterity. */
|
||||
socket_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace ams::htclow::driver {
|
||||
/* Setup client socket. */
|
||||
R_TRY(this->SetupClientSocket(client_desc));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result SocketDriver::CreateServerSocket() {
|
||||
@@ -86,7 +86,7 @@ namespace ams::htclow::driver {
|
||||
m_server_socket = desc;
|
||||
m_server_socket_valid = true;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void SocketDriver::DestroyServerSocket() {
|
||||
@@ -116,7 +116,7 @@ namespace ams::htclow::driver {
|
||||
m_client_socket = desc;
|
||||
m_client_socket_valid = true;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool SocketDriver::IsAutoConnectReserved() {
|
||||
@@ -180,7 +180,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
Result SocketDriver::Open() {
|
||||
m_discovery_manager.OnDriverOpen();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void SocketDriver::Close() {
|
||||
@@ -251,7 +251,7 @@ namespace ams::htclow::driver {
|
||||
R_UNLESS(cur_sent > 0, htclow::ResultSocketSendError());
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result SocketDriver::Receive(void *dst, int dst_size) {
|
||||
@@ -265,7 +265,7 @@ namespace ams::htclow::driver {
|
||||
R_UNLESS(cur_recv > 0, htclow::ResultSocketReceiveError());
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void SocketDriver::CancelSendReceive() {
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
/* We're connected. */
|
||||
m_connected = true;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void UsbDriver::Shutdown() {
|
||||
@@ -92,7 +92,7 @@ namespace ams::htclow::driver {
|
||||
transferred += cur;
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result UsbDriver::Receive(void *dst, int dst_size) {
|
||||
@@ -107,7 +107,7 @@ namespace ams::htclow::driver {
|
||||
transferred += cur;
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void UsbDriver::CancelSendReceive() {
|
||||
|
||||
@@ -207,11 +207,11 @@ namespace ams::htclow::driver {
|
||||
Result ConvertUsbDriverResult(Result result) {
|
||||
if (result.GetModule() == R_NAMESPACE_MODULE_ID(usb)) {
|
||||
if (usb::ResultResourceBusy::Includes(result)) {
|
||||
return htclow::ResultUsbDriverBusyError();
|
||||
R_THROW(htclow::ResultUsbDriverBusyError());
|
||||
} else if (usb::ResultMemAllocFailure::Includes(result)) {
|
||||
return htclow::ResultOutOfMemory();
|
||||
R_THROW(htclow::ResultOutOfMemory());
|
||||
} else {
|
||||
return htclow::ResultUsbDriverUnknownError();
|
||||
R_THROW(htclow::ResultUsbDriverUnknownError());
|
||||
}
|
||||
} else {
|
||||
return result;
|
||||
@@ -241,7 +241,7 @@ namespace ams::htclow::driver {
|
||||
/* Set binary object store. */
|
||||
R_TRY(g_ds_client.SetBinaryObjectStore(BinaryObjectStore, sizeof(BinaryObjectStore)));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result InitializeDsInterface() {
|
||||
@@ -263,13 +263,13 @@ namespace ams::htclow::driver {
|
||||
R_TRY(g_ds_interface.AppendConfigurationData(usb::UsbDeviceSpeed_Super, std::addressof(UsbEndpointDescriptorsSuperSpeed[1]), sizeof(usb::UsbEndpointDescriptor)));
|
||||
R_TRY(g_ds_interface.AppendConfigurationData(usb::UsbDeviceSpeed_Super, std::addressof(UsbEndpointCompanionDescriptor), sizeof(usb::UsbEndpointCompanionDescriptor)));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result InitializeDsEndpoints() {
|
||||
R_TRY(g_ds_endpoints[0].Initialize(std::addressof(g_ds_interface), 0x81));
|
||||
R_TRY(g_ds_endpoints[1].Initialize(std::addressof(g_ds_interface), 0x01));
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void UsbIndicationThreadFunction(void *) {
|
||||
@@ -400,7 +400,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
/* We succeeded! */
|
||||
init_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void FinalizeUsbInterface() {
|
||||
@@ -432,7 +432,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
/* Set output transferred size. */
|
||||
*out_transferred = src_size;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ReceiveUsb(int *out_transferred, void *dst, int dst_size) {
|
||||
@@ -449,7 +449,7 @@ namespace ams::htclow::driver {
|
||||
|
||||
/* Set output transferred size. */
|
||||
*out_transferred = dst_size;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void CancelUsbSendReceive() {
|
||||
|
||||
@@ -111,7 +111,7 @@ namespace ams::htclow {
|
||||
AMS_ASSERT(received <= size);
|
||||
*out = received;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Channel::Send(s64 *out, const void *src, s64 size) {
|
||||
@@ -149,7 +149,7 @@ namespace ams::htclow {
|
||||
AMS_ASSERT(total_sent <= size);
|
||||
*out = total_sent;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void Channel::SetConfig(const ChannelConfig &config) {
|
||||
@@ -207,7 +207,7 @@ namespace ams::htclow {
|
||||
AMS_ASSERT(util::IsIntValueRepresentable<s64>(received));
|
||||
*out = static_cast<s64>(received);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Channel::WaitReceiveInternal(s64 size, os::EventType *event) {
|
||||
@@ -222,7 +222,7 @@ namespace ams::htclow {
|
||||
if (event != nullptr) {
|
||||
if (os::WaitAny(event, m_manager->GetTaskEvent(task_id)) == 0) {
|
||||
m_manager->WaitReceiveEnd(task_id);
|
||||
return htclow::ResultChannelWaitCancelled();
|
||||
R_THROW(htclow::ResultChannelWaitCancelled());
|
||||
}
|
||||
} else {
|
||||
this->WaitEvent(m_manager->GetTaskEvent(task_id), false);
|
||||
|
||||
@@ -50,7 +50,7 @@ namespace ams::htclow {
|
||||
m_is_driver_open = true;
|
||||
|
||||
drv_guard.Cancel();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void HtclowManagerImpl::CloseDriver() {
|
||||
@@ -114,7 +114,7 @@ namespace ams::htclow {
|
||||
|
||||
/* Try to ready ourselves. */
|
||||
m_ctrl_service.TryReady();
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result HtclowManagerImpl::ConnectEnd(impl::ChannelInternalType channel, u32 task_id) {
|
||||
|
||||
@@ -116,7 +116,7 @@ namespace ams::htclow {
|
||||
/* Process the received packet. */
|
||||
m_service->ProcessReceivePacket(header, m_receive_packet_body, header.body_size);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Worker::ProcessReceive(const PacketHeader &header) {
|
||||
@@ -131,7 +131,7 @@ namespace ams::htclow {
|
||||
/* Process the received packet. */
|
||||
m_mux->ProcessReceivePacket(header, m_receive_packet_body, header.body_size);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Worker::ProcessSend() {
|
||||
@@ -171,7 +171,7 @@ namespace ams::htclow {
|
||||
|
||||
/* Check if we're cancelled. */
|
||||
if (m_cancelled) {
|
||||
return htclow::ResultCancelled();
|
||||
R_THROW(htclow::ResultCancelled());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -59,7 +59,7 @@ namespace ams::htclow::mux {
|
||||
AMS_UNREACHABLE_DEFAULT_CASE();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Mux::ProcessReceivePacket(const PacketHeader &header, const void *body, size_t body_size) {
|
||||
@@ -73,7 +73,7 @@ namespace ams::htclow::mux {
|
||||
if (header.packet_type == PacketType_Data || header.packet_type == PacketType_MaxData) {
|
||||
this->SendErrorPacket(header.channel);
|
||||
}
|
||||
return htclow::ResultChannelNotExist();
|
||||
R_THROW(htclow::ResultChannelNotExist());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
Result Mux::CheckChannelExist(impl::ChannelInternalType channel) {
|
||||
R_UNLESS(m_channel_impl_map.Exists(channel), htclow::ResultChannelNotExist());
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Mux::SendErrorPacket(impl::ChannelInternalType channel) {
|
||||
@@ -153,7 +153,7 @@ namespace ams::htclow::mux {
|
||||
/* Signal our event. */
|
||||
m_event.Signal();
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool Mux::IsSendable(PacketType packet_type) const {
|
||||
@@ -181,7 +181,7 @@ namespace ams::htclow::mux {
|
||||
/* Set the channel version. */
|
||||
m_channel_impl_map.GetChannelImpl(channel).SetVersion(m_version);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Mux::Close(impl::ChannelInternalType channel) {
|
||||
@@ -197,7 +197,7 @@ namespace ams::htclow::mux {
|
||||
R_ABORT_UNLESS(m_channel_impl_map.RemoveChannel(channel));
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Mux::ConnectBegin(u32 *out_task_id, impl::ChannelInternalType channel) {
|
||||
@@ -272,7 +272,7 @@ namespace ams::htclow::mux {
|
||||
/* Check that we didn't hit a disconnect. */
|
||||
R_UNLESS(trigger != EventTrigger_Disconnect, htclow::ResultInvalidChannelStateDisconnected());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
os::EventType *Mux::GetTaskEvent(u32 task_id) {
|
||||
@@ -311,7 +311,7 @@ namespace ams::htclow::mux {
|
||||
return m_channel_impl_map[it->second].DoReceiveEnd(out, dst, dst_size);
|
||||
} else {
|
||||
*out = 0;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +340,7 @@ namespace ams::htclow::mux {
|
||||
/* Check that we didn't hit a disconnect. */
|
||||
R_UNLESS(trigger != EventTrigger_Disconnect, htclow::ResultInvalidChannelStateDisconnected());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result Mux::WaitReceiveBegin(u32 *out_task_id, impl::ChannelInternalType channel, size_t size) {
|
||||
@@ -360,7 +360,7 @@ namespace ams::htclow::mux {
|
||||
/* Check that we didn't hit a disconnect. */
|
||||
R_UNLESS(trigger != EventTrigger_Disconnect, htclow::ResultInvalidChannelStateDisconnected());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void Mux::SetConfig(impl::ChannelInternalType channel, const ChannelConfig &config) {
|
||||
|
||||
@@ -52,15 +52,15 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Otherwise, return appropriate failure error. */
|
||||
if (m_state == ChannelState_Disconnected) {
|
||||
return htclow::ResultInvalidChannelStateDisconnected();
|
||||
R_THROW(htclow::ResultInvalidChannelStateDisconnected());
|
||||
} else {
|
||||
return htclow::ResultInvalidChannelState();
|
||||
R_THROW(htclow::ResultInvalidChannelState());
|
||||
}
|
||||
}
|
||||
|
||||
Result ChannelImpl::CheckPacketVersion(s16 version) const {
|
||||
R_UNLESS(version == m_version, htclow::ResultChannelVersionNotMatched());
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace ams::htclow::mux {
|
||||
case PacketType_Error:
|
||||
return this->ProcessReceiveErrorPacket();
|
||||
default:
|
||||
return htclow::ResultProtocolError();
|
||||
R_THROW(htclow::ResultProtocolError());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace ams::htclow::mux {
|
||||
/* Notify the data was received. */
|
||||
m_task_manager->NotifyReceiveData(m_channel, m_receive_buffer.GetDataSize());
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::ProcessReceiveMaxDataPacket(s16 version, u64 share) {
|
||||
@@ -134,14 +134,14 @@ namespace ams::htclow::mux {
|
||||
this->SignalSendPacketEvent();
|
||||
}
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::ProcessReceiveErrorPacket() {
|
||||
if (m_state == ChannelState_Connected || m_state == ChannelState_Disconnected) {
|
||||
this->ShutdownForce();
|
||||
}
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
bool ChannelImpl::QuerySendPacket(PacketHeader *header, PacketBody *body, int *out_body_size) {
|
||||
@@ -250,7 +250,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Set the output task id. */
|
||||
*out_task_id = task_id;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::DoConnectEnd() {
|
||||
@@ -287,7 +287,7 @@ namespace ams::htclow::mux {
|
||||
/* Set our state as connected. */
|
||||
this->SetState(ChannelState_Connected);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::DoFlush(u32 *out_task_id) {
|
||||
@@ -308,7 +308,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Set the output task id. */
|
||||
*out_task_id = task_id;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::DoReceiveBegin(u32 *out_task_id, size_t size) {
|
||||
@@ -331,7 +331,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Set the output task id. */
|
||||
*out_task_id = task_id;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
|
||||
}
|
||||
Result ChannelImpl::DoReceiveEnd(size_t *out, void *dst, size_t dst_size) {
|
||||
@@ -341,7 +341,7 @@ namespace ams::htclow::mux {
|
||||
/* If we have nowhere to receive, we're done. */
|
||||
if (dst_size == 0) {
|
||||
*out = 0;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
/* Get the amount of receivable data. */
|
||||
@@ -381,7 +381,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Set the output size. */
|
||||
*out = received;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::DoSend(u32 *out_task_id, size_t *out, const void *src, size_t src_size) {
|
||||
@@ -413,7 +413,7 @@ namespace ams::htclow::mux {
|
||||
*out_task_id = task_id;
|
||||
*out = sent;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImpl::DoShutdown() {
|
||||
@@ -422,7 +422,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Set our state. */
|
||||
this->SetState(ChannelState_Disconnected);
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void ChannelImpl::SetConfig(const ChannelConfig &config) {
|
||||
|
||||
@@ -64,7 +64,7 @@ namespace ams::htclow::mux {
|
||||
/* Insert into our map. */
|
||||
m_map.insert(std::pair<const impl::ChannelInternalType, int>{channel, idx});
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result ChannelImplMap::RemoveChannel(impl::ChannelInternalType channel) {
|
||||
@@ -88,7 +88,7 @@ namespace ams::htclow::mux {
|
||||
/* Destroy the channel. */
|
||||
std::destroy_at(channel_impl);
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ams::htclow::mux {
|
||||
/* We don't, so push back a new one. */
|
||||
m_packet_list.push_back(*(ptr.release()));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void GlobalSendBuffer::RemovePacket() {
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace ams::htclow::mux {
|
||||
/* Discard. */
|
||||
R_TRY(this->Discard(size));
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result RingBuffer::Write(const void *data, size_t size) {
|
||||
@@ -81,7 +81,7 @@ namespace ams::htclow::mux {
|
||||
/* Update our data size. */
|
||||
m_data_size += size;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result RingBuffer::Copy(void *dst, size_t size) {
|
||||
@@ -108,7 +108,7 @@ namespace ams::htclow::mux {
|
||||
/* Mark that we can discard. */
|
||||
m_can_discard = true;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
Result RingBuffer::Discard(size_t size) {
|
||||
@@ -127,7 +127,7 @@ namespace ams::htclow::mux {
|
||||
m_data_size -= size;
|
||||
m_can_discard = false;
|
||||
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ namespace ams::htclow::mux {
|
||||
|
||||
/* Return the task id. */
|
||||
*out_task_id = task_id;
|
||||
return ResultSuccess();
|
||||
R_SUCCEED();
|
||||
}
|
||||
|
||||
void TaskManager::FreeTask(u32 task_id) {
|
||||
|
||||
Reference in New Issue
Block a user