Remove U64_MAX in favor of using UINT64_MAX

This commit is contained in:
fincs 2020-03-16 16:21:33 +01:00
parent cacf8615a8
commit 6535d6f871
No known key found for this signature in database
GPG Key ID: 62C7609ADA219C60
21 changed files with 64 additions and 67 deletions

View File

@ -40,7 +40,7 @@ Result condvarWaitTimeout(CondVar* c, Mutex* m, u64 timeout);
*/
static inline Result condvarWait(CondVar* c, Mutex* m)
{
return condvarWaitTimeout(c, m, U64_MAX);
return condvarWaitTimeout(c, m, UINT64_MAX);
}
/**

View File

@ -188,7 +188,7 @@ typedef enum {
TickCountInfo_Core2 = 2, ///< Tick count on core 2.
TickCountInfo_Core3 = 3, ///< Tick count on core 3.
TickCountInfo_Total = U64_MAX, ///< Tick count on all cores.
TickCountInfo_Total = UINT64_MAX, ///< Tick count on all cores.
} TickCountInfo;
/// GetInfo InitialProcessIdRange Sub IDs.

View File

@ -1003,7 +1003,7 @@ Result appletLockAccessorTryLock(AppletLockAccessor *a, bool *flag);
/**
* @brief Lock a LockAccessor.
* @note Similar to \ref appletLockAccessorTryLock, except this uses timeout U64_MAX with the eventWait call, and this uses TryLock repeatedly until the output flag value is true.
* @note Similar to \ref appletLockAccessorTryLock, except this uses timeout UINT64_MAX with the eventWait call, and this uses TryLock repeatedly until the output flag value is true.
* @param a LockAccessor object.
*/
Result appletLockAccessorLock(AppletLockAccessor *a);
@ -1095,7 +1095,7 @@ Result appletHolderTerminate(AppletHolder *h);
/**
* @brief Uses cmds GetAppletStateChangedEvent and RequestExit, then waits for the LibraryApplet to exit with the specified timeout. If a timeout occurs, the Terminate cmd is used.
* @param h AppletHolder object.
* @param[in] timeout Timeout in nanoseconds. U64_MAX for no timeout.
* @param[in] timeout Timeout in nanoseconds. UINT64_MAX for no timeout.
*/
Result appletHolderRequestExitOrTerminate(AppletHolder *h, u64 timeout);
@ -1792,7 +1792,7 @@ Result appletApplicationAreAnyLibraryAppletsLeft(AppletApplication *a, bool *out
/**
* @brief Calls the same func as \ref appletHolderRequestExitOrTerminate with the output IAppletAccessor from the GetCurrentLibraryApplet cmd.
* @param a \ref AppletApplication
* @param[in] timeout Timeout in nanoseconds. U64_MAX for no timeout.
* @param[in] timeout Timeout in nanoseconds. UINT64_MAX for no timeout.
*/
Result appletApplicationRequestExitLibraryAppletOrTerminate(AppletApplication *a, u64 timeout);

View File

@ -27,7 +27,7 @@ typedef struct {
/**
* @brief Close a \ref AsyncValue.
* @note When the object is initialized, this uses \ref asyncValueCancel then \ref asyncValueWait with timeout=U64_MAX.
* @note When the object is initialized, this uses \ref asyncValueCancel then \ref asyncValueWait with timeout=UINT64_MAX.
* @param a \ref AsyncValue
*/
void asyncValueClose(AsyncValue *a);
@ -35,7 +35,7 @@ void asyncValueClose(AsyncValue *a);
/**
* @brief Waits for the async operation to finish using the specified timeout.
* @param a \ref AsyncValue
* @param[in] timeout Timeout in nanoseconds. U64_MAX for no timeout.
* @param[in] timeout Timeout in nanoseconds. UINT64_MAX for no timeout.
*/
Result asyncValueWait(AsyncValue *a, u64 timeout);
@ -48,7 +48,7 @@ Result asyncValueGetSize(AsyncValue *a, u64 *size);
/**
* @brief Gets the value.
* @note Prior to using the cmd, this uses \ref asyncResultWait with timeout=U64_MAX.
* @note Prior to using the cmd, this uses \ref asyncResultWait with timeout=UINT64_MAX.
* @param a \ref AsyncValue
* @param[out] buffer Output buffer.
* @param[in] size Output buffer size.
@ -77,7 +77,7 @@ Result asyncValueGetErrorContext(AsyncValue *a, ErrorContext *context);
/**
* @brief Close a \ref AsyncResult.
* @note When the object is initialized, this uses \ref asyncResultCancel then \ref asyncResultWait with timeout=U64_MAX.
* @note When the object is initialized, this uses \ref asyncResultCancel then \ref asyncResultWait with timeout=UINT64_MAX.
* @param a \ref AsyncResult
*/
void asyncResultClose(AsyncResult *a);
@ -85,13 +85,13 @@ void asyncResultClose(AsyncResult *a);
/**
* @brief Waits for the async operation to finish using the specified timeout.
* @param a \ref AsyncResult
* @param[in] timeout Timeout in nanoseconds. U64_MAX for no timeout.
* @param[in] timeout Timeout in nanoseconds. UINT64_MAX for no timeout.
*/
Result asyncResultWait(AsyncResult *a, u64 timeout);
/**
* @brief Gets the Result.
* @note Prior to using the cmd, this uses \ref asyncResultWait with timeout=U64_MAX.
* @note Prior to using the cmd, this uses \ref asyncResultWait with timeout=UINT64_MAX.
* @param a \ref AsyncResult
*/
Result asyncResultGet(AsyncResult *a);

View File

@ -63,7 +63,7 @@ Result audinCaptureBuffer(AudioInBuffer *source, AudioInBuffer **released);
* @brief Waits for audio capture to finish.
* @param released AudioInBuffer to receive the first captured buffer after being released.
* @param released_count Pointer to receive the number of captured buffers.
* @param timeout Timeout value, use U64_MAX to wait until all finished.
* @param timeout Timeout value, use UINT64_MAX to wait until all finished.
*/
Result audinWaitCaptureFinish(AudioInBuffer **released, u32* released_count, u64 timeout);

View File

@ -63,7 +63,7 @@ Result audoutPlayBuffer(AudioOutBuffer *source, AudioOutBuffer **released);
* @brief Waits for audio playback to finish.
* @param released AudioOutBuffer to receive the first played buffer after being released.
* @param released_count Pointer to receive the number of played buffers.
* @param timeout Timeout value, use U64_MAX to wait until all finished.
* @param timeout Timeout value, use UINT64_MAX to wait until all finished.
*/
Result audoutWaitPlayFinish(AudioOutBuffer **released, u32* released_count, u64 timeout);

View File

@ -906,7 +906,7 @@ Result nsCanDeliverApplication(const NsApplicationDeliveryInfo *info0, s32 count
Result nsListContentMetaKeyToDeliverApplication(NcmContentMetaKey *meta, s32 meta_count, s32 meta_index, const NsApplicationDeliveryInfo *info, s32 info_count, s32 *total_out);
/**
* @brief After validation etc, this sets the output bool by comparing system-version fields in the \ref NsSystemDeliveryInfo / info-array and with a state field.
* @brief After validation etc, this sets the output bool by comparing system-version fields in the \ref NsSystemDeliveryInfo / info-array and with a state field.
* @note Only available on [4.0.0+].
* @param[in] info Input array of \ref NsApplicationDeliveryInfo.
* @param[in] count Size of the info array in entries. Must be value 1.
@ -1239,7 +1239,7 @@ Result nsProgressMonitorForDeleteUserSaveDataAllGetProgress(NsProgressMonitorFor
/**
* @brief Close a \ref NsProgressAsyncResult.
* @note When the object is initialized, this uses \ref nsProgressAsyncResultCancel then \ref nsProgressAsyncResultWait with timeout=U64_MAX.
* @note When the object is initialized, this uses \ref nsProgressAsyncResultCancel then \ref nsProgressAsyncResultWait with timeout=UINT64_MAX.
* @param a \ref NsProgressAsyncResult
*/
void nsProgressAsyncResultClose(NsProgressAsyncResult *a);
@ -1247,13 +1247,13 @@ void nsProgressAsyncResultClose(NsProgressAsyncResult *a);
/**
* @brief Waits for the async operation to finish using the specified timeout.
* @param a \ref NsProgressAsyncResult
* @param[in] timeout Timeout in nanoseconds. U64_MAX for no timeout.
* @param[in] timeout Timeout in nanoseconds. UINT64_MAX for no timeout.
*/
Result nsProgressAsyncResultWait(NsProgressAsyncResult *a, u64 timeout);
/**
* @brief Gets the Result.
* @note Prior to using the cmd, this uses \ref nsProgressAsyncResultWait with timeout=U64_MAX.
* @note Prior to using the cmd, this uses \ref nsProgressAsyncResultWait with timeout=UINT64_MAX.
* @param a \ref NsProgressAsyncResult
*/
Result nsProgressAsyncResultGet(NsProgressAsyncResult *a);

View File

@ -10,9 +10,6 @@
#include <stddef.h>
#include <stdalign.h>
/// The maximum value of a u64.
#define U64_MAX UINT64_MAX
#ifndef SSIZE_MAX
#ifdef SIZE_MAX
#define SSIZE_MAX ((SIZE_MAX) >> 1)

View File

@ -222,7 +222,7 @@ Result nwindowDequeueBuffer(NWindow* nw, s32* out_slot, NvMultiFence* out_fence)
if (eventActive(&nw->event)) {
do {
eventWait(&nw->event, U64_MAX);
eventWait(&nw->event, UINT64_MAX);
rc = bqDequeueBuffer(&nw->bq, true, nw->width, nw->height, nw->format, nw->usage, &slot, &fence);
} while (rc == MAKERESULT(Module_LibnxBinder, LibnxBinderError_WouldBlock));
}

View File

@ -84,7 +84,7 @@ void _nvFenceCleanup(void)
static Result _nvFenceEventWaitCommon(Event* event, u32 event_id, s32 timeout_us)
{
u64 timeout_ns = U64_MAX;
u64 timeout_ns = UINT64_MAX;
if (timeout_us >= 0)
timeout_ns = (u64)1000*timeout_us;
Result rc = eventWait(event, timeout_ns);

View File

@ -409,7 +409,7 @@ static Result _usbCommsRead(usbCommsInterface *interface, void* buffer, size_t s
UsbDsReportData reportdata;
//Makes sure endpoints are ready for data-transfer / wait for init if needed.
rc = usbDsWaitReady(U64_MAX);
rc = usbDsWaitReady(UINT64_MAX);
if (R_FAILED(rc)) return rc;
while(size)
@ -438,7 +438,7 @@ static Result _usbCommsRead(usbCommsInterface *interface, void* buffer, size_t s
if (R_FAILED(rc)) return rc;
//Wait for the transfer to finish.
eventWait(&interface->endpoint_out->CompletionEvent, U64_MAX);
eventWait(&interface->endpoint_out->CompletionEvent, UINT64_MAX);
eventClear(&interface->endpoint_out->CompletionEvent);
rc = usbDsEndpoint_GetReportData(interface->endpoint_out, &reportdata);
@ -474,7 +474,7 @@ static Result _usbCommsWrite(usbCommsInterface *interface, const void* buffer, s
UsbDsReportData reportdata;
//Makes sure endpoints are ready for data-transfer / wait for init if needed.
rc = usbDsWaitReady(U64_MAX);
rc = usbDsWaitReady(UINT64_MAX);
if (R_FAILED(rc)) return rc;
while(size)
@ -501,7 +501,7 @@ static Result _usbCommsWrite(usbCommsInterface *interface, const void* buffer, s
if(R_FAILED(rc))return rc;
//Wait for the transfer to finish.
eventWait(&interface->endpoint_in->CompletionEvent, U64_MAX);
eventWait(&interface->endpoint_in->CompletionEvent, UINT64_MAX);
eventClear(&interface->endpoint_in->CompletionEvent);
rc = usbDsEndpoint_GetReportData(interface->endpoint_in, &reportdata);

View File

@ -254,7 +254,7 @@ Result _appletInitialize(void) {
//Don't enter this msg-loop when g_appletFocusState is already 1, it will hang when applet was previously initialized in the context of the current process for AppletType_Application.
if (R_SUCCEEDED(rc) && g_appletFocusState != AppletFocusState_Focused) {
do {
eventWait(&g_appletMessageEvent, U64_MAX);
eventWait(&g_appletMessageEvent, UINT64_MAX);
u32 msg;
rc = _appletReceiveMessage(&msg);
@ -873,7 +873,7 @@ static Result _appletWaitAcquiredSleepLockEvent(void) {
Event tmpevent={0};
rc = _appletGetAcquiredSleepLockEvent(&tmpevent);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, UINT64_MAX);
eventClose(&tmpevent);
return rc;
}
@ -1027,7 +1027,7 @@ static Result _appletWaitLibraryAppletLaunchableEvent(void) {
if (!eventActive(&g_appletLibraryAppletLaunchableEvent))
rc = _appletCmdGetEvent(&g_appletISelfController, &g_appletLibraryAppletLaunchableEvent, false, 9);
if (R_SUCCEEDED(rc)) rc = eventWait(&g_appletLibraryAppletLaunchableEvent, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&g_appletLibraryAppletLaunchableEvent, UINT64_MAX);
return rc;
}
@ -1404,7 +1404,7 @@ Result appletLockAccessorLock(AppletLockAccessor *a) {
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
do {
rc = eventWait(&a->event, U64_MAX);
rc = eventWait(&a->event, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = _appletLockAccessorTryLock(a, false, NULL, &flag);
if (R_FAILED(rc)) break;
} while(!flag);
@ -1602,7 +1602,7 @@ void appletHolderJoin(AppletHolder *h) {
LibAppletExitReason res = LibAppletExitReason_Normal;
u32 desc=0;
eventWait(&h->StateChangedEvent, U64_MAX);
eventWait(&h->StateChangedEvent, UINT64_MAX);
rc = _appletCmdNoIO(&h->s, 30);//GetResult
if (R_FAILED(rc)) {
@ -1642,7 +1642,7 @@ bool appletHolderWaitInteractiveOut(AppletHolder *h) {
rc = _appletHolderGetPopInteractiveOutDataEvent(h);
if (R_FAILED(rc)) return false;
rc = waitMulti(&idx, U64_MAX, waiterForEvent(&h->PopInteractiveOutDataEvent), waiterForEvent(&h->StateChangedEvent));
rc = waitMulti(&idx, UINT64_MAX, waiterForEvent(&h->PopInteractiveOutDataEvent), waiterForEvent(&h->StateChangedEvent));
if (R_FAILED(rc)) return false;
return idx==0;
@ -2387,7 +2387,7 @@ void appletApplicationJoin(AppletApplication *a) {
AppletApplicationExitReason res = AppletApplicationExitReason_Normal;
u32 desc=0;
eventWait(&a->StateChangedEvent, U64_MAX);
eventWait(&a->StateChangedEvent, UINT64_MAX);
rc = _appletCmdNoIO(&a->s, 30);//GetResult
if (R_FAILED(rc)) {

View File

@ -22,7 +22,7 @@ static Result _asyncCmdNoInOutBuf(Service* srv, void* buffer, size_t size, u32 c
void asyncValueClose(AsyncValue *a) {
if (serviceIsActive(&a->s)) {
asyncValueCancel(a); // Official sw ignores rc from this prior to waiting on the event.
asyncValueWait(a, U64_MAX);
asyncValueWait(a, UINT64_MAX);
}
serviceClose(&a->s);
@ -47,7 +47,7 @@ Result asyncValueGet(AsyncValue *a, void* buffer, size_t size) {
if (!serviceIsActive(&a->s))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
Result rc = asyncValueWait(a, U64_MAX);
Result rc = asyncValueWait(a, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = _asyncCmdNoInOutBuf(&a->s, buffer, size, 1);
return rc;
}
@ -73,7 +73,7 @@ Result asyncValueGetErrorContext(AsyncValue *a, ErrorContext *context) {
void asyncResultClose(AsyncResult *a) {
if (serviceIsActive(&a->s)) {
asyncResultCancel(a); // Official sw ignores rc from this prior to waiting on the event.
asyncResultWait(a, U64_MAX);
asyncResultWait(a, UINT64_MAX);
}
serviceClose(&a->s);
@ -91,7 +91,7 @@ Result asyncResultGet(AsyncResult *a) {
if (!serviceIsActive(&a->s))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
Result rc = asyncResultWait(a, U64_MAX);
Result rc = asyncResultWait(a, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = _asyncCmdNoIO(&a->s, 0);
return rc;
}

View File

@ -25,21 +25,21 @@ NX_GENERATE_SERVICE_GUARD(audin);
Result _audinInitialize(void) {
Result rc = 0;
rc = smGetService(&g_audinSrv, "audin:u");
// Setup the default device
if (R_SUCCEEDED(rc)) {
// Passing an empty device name will open the default "BuiltInHeadset"
char DeviceNameIn[DEVICE_NAME_LENGTH] = {0};
char DeviceNameOut[DEVICE_NAME_LENGTH] = {0};
// Open audio input device
rc = audinOpenAudioIn(DeviceNameIn, DeviceNameOut, DEFAULT_SAMPLE_RATE, DEFAULT_CHANNEL_COUNT, &g_sampleRate, &g_channelCount, &g_pcmFormat, &g_deviceState);
}
// Register global handle for buffer events
if (R_SUCCEEDED(rc))
rc = _audinRegisterBufferEvent(&g_audinBufferEvent);
return rc;
}
@ -106,25 +106,25 @@ static Result _audinCmdNoInOutU32(Service* srv, u32 *out, u32 cmd_id) {
Result audinWaitCaptureFinish(AudioInBuffer **released, u32* released_count, u64 timeout) {
// Wait on the buffer event handle
Result rc = eventWait(&g_audinBufferEvent, timeout);
if (R_SUCCEEDED(rc)) {
// Grab the released buffer
rc = audinGetReleasedAudioInBuffer(released, released_count);
}
return rc;
}
Result audinCaptureBuffer(AudioInBuffer *source, AudioInBuffer **released) {
Result rc = 0;
u32 released_count = 0;
// Try to push the supplied buffer to the audio input device
rc = audinAppendAudioInBuffer(source);
if (R_SUCCEEDED(rc))
rc = audinWaitCaptureFinish(released, &released_count, U64_MAX);
rc = audinWaitCaptureFinish(released, &released_count, UINT64_MAX);
return rc;
}

View File

@ -25,17 +25,17 @@ NX_GENERATE_SERVICE_GUARD(audout);
Result _audoutInitialize(void) {
Result rc = 0;
rc = smGetService(&g_audoutSrv, "audout:u");
// Setup the default device
if (R_SUCCEEDED(rc)) {
// Passing an empty device name will open the default "DeviceOut"
char DeviceNameIn[DEVICE_NAME_LENGTH] = {0};
char DeviceNameOut[DEVICE_NAME_LENGTH] = {0};
// Open audio output device
rc = audoutOpenAudioOut(DeviceNameIn, DeviceNameOut, DEFAULT_SAMPLE_RATE, DEFAULT_CHANNEL_COUNT, &g_sampleRate, &g_channelCount, &g_pcmFormat, &g_deviceState);
}
// Register global handle for buffer events
if (R_SUCCEEDED(rc))
rc = _audoutRegisterBufferEvent(&g_audoutBufferEvent);
@ -106,25 +106,25 @@ static Result _audoutCmdNoInOutU32(Service* srv, u32 *out, u32 cmd_id) {
Result audoutWaitPlayFinish(AudioOutBuffer **released, u32* released_count, u64 timeout) {
// Wait on the buffer event handle
Result rc = eventWait(&g_audoutBufferEvent, timeout);
if (R_SUCCEEDED(rc)) {
// Grab the released buffer
rc = audoutGetReleasedAudioOutBuffer(released, released_count);
}
return rc;
}
Result audoutPlayBuffer(AudioOutBuffer *source, AudioOutBuffer **released) {
Result rc = 0;
u32 released_count = 0;
// Try to push the supplied buffer to the audio output device
rc = audoutAppendAudioOutBuffer(source);
if (R_SUCCEEDED(rc))
rc = audoutWaitPlayFinish(released, &released_count, U64_MAX);
rc = audoutWaitPlayFinish(released, &released_count, UINT64_MAX);
return rc;
}

View File

@ -136,7 +136,7 @@ static Result _audrenCmdNoInOutU32(Service* srv, u32 *out, u32 cmd_id) {
}
void audrenWaitFrame(void) {
eventWait(&g_audrenEvent, U64_MAX);
eventWait(&g_audrenEvent, UINT64_MAX);
}
Result _audrenOpenAudioRenderer(Service* srv, Service* srv_out, const AudioRendererParameter* param) {

View File

@ -142,7 +142,7 @@ Result grcTrimGameMovie(GrcGameMovieId *dst_movieid, const GrcGameMovieId *src_m
if (R_SUCCEEDED(rc)) rc = _grcGameMovieTrimmerBeginTrim(&trimmer, src_movieid, start, end);
if (R_SUCCEEDED(rc)) rc = eventWait(&trimevent, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&trimevent, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = _grcGameMovieTrimmerEndTrim(&trimmer, dst_movieid);
@ -308,7 +308,7 @@ Result grcMovieMakerFinish(GrcMovieMaker *m, s32 width, s32 height, const void*
rc = _grcCmdInU64NoOut(&m->s, m->layer_handle, 22); // RequestOffscreenRecordingFinishReady
if (R_SUCCEEDED(rc)) rc = eventWait(&m->recording_event, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&m->recording_event, UINT64_MAX);
if (hosversionAtLeast(7,0,0))
rc = _grcMovieMakerCompleteOffscreenRecordingFinishEx1(m, width, height, userdata, userdata_size, thumbnail, thumbnail_size, entry);
@ -342,7 +342,7 @@ Result grcMovieMakerEncodeAudioSample(GrcMovieMaker *m, const void* buffer, size
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
for (u64 pos=0; size!=0; pos+=out_size, size-=out_size) {
rc = eventWait(&m->audio_event, U64_MAX);
rc = eventWait(&m->audio_event, UINT64_MAX);
if (R_FAILED(rc)) break;
rc = _grcMovieMakerEncodeOffscreenLayerAudioSample(m, &bufptr[pos], size, &out_size);

View File

@ -365,7 +365,7 @@ Result hidbusSendAndReceive(HidbusBusHandle handle, const void* inbuf, size_t in
rc = _hidbusSendCommandAsync(&srv, handle, inbuf, inbuf_size);
}
if (R_SUCCEEDED(rc)) {
eventWait(&entry->event, U64_MAX);
eventWait(&entry->event, UINT64_MAX);
eventClear(&entry->event);
u32 tmpout=0;
rc = _hidbusGetSendCommandAsynceResult(&srv, handle, outbuf, outbuf_size, &tmpout);

View File

@ -165,7 +165,7 @@ Result hiddbgReadSerialFlash(u32 offset, void* buffer, size_t size, u64 UniquePa
rc = hiddbgAcquireOperationEventHandle(&tmpevent, true, UniquePadId); // *Must* be used before _hiddbgReadSerialFlash.
if (R_SUCCEEDED(rc)) rc = _hiddbgReadSerialFlash(&tmem, offset, size, UniquePadId);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = hiddbgGetOperationResult(UniquePadId);
if (R_SUCCEEDED(rc)) memcpy(buffer, tmem.src_addr, size);
eventClose(&tmpevent);
@ -186,7 +186,7 @@ Result hiddbgWriteSerialFlash(u32 offset, void* buffer, size_t tmem_size, size_t
rc = hiddbgAcquireOperationEventHandle(&tmpevent, true, UniquePadId); // *Must* be used before _hiddbgWriteSerialFlash.
if (R_SUCCEEDED(rc)) rc = _hiddbgWriteSerialFlash(&tmem, offset, tmem_size, size, UniquePadId);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, U64_MAX);
if (R_SUCCEEDED(rc)) rc = eventWait(&tmpevent, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = hiddbgGetOperationResult(UniquePadId);
eventClose(&tmpevent);
tmemClose(&tmem);

View File

@ -2150,7 +2150,7 @@ Result nsProgressMonitorForDeleteUserSaveDataAllGetProgress(NsProgressMonitorFor
void nsProgressAsyncResultClose(NsProgressAsyncResult *a) {
if (serviceIsActive(&a->s)) {
nsProgressAsyncResultCancel(a); // Official sw ignores rc from this prior to waiting on the event.
nsProgressAsyncResultWait(a, U64_MAX);
nsProgressAsyncResultWait(a, UINT64_MAX);
}
serviceClose(&a->s);
@ -2168,7 +2168,7 @@ Result nsProgressAsyncResultGet(NsProgressAsyncResult *a) {
if (!serviceIsActive(&a->s))
return MAKERESULT(Module_Libnx, LibnxError_NotInitialized);
Result rc = nsProgressAsyncResultWait(a, U64_MAX);
Result rc = nsProgressAsyncResultWait(a, UINT64_MAX);
if (R_SUCCEEDED(rc)) rc = _nsCmdNoIO(&a->s, 0);
return rc;
}

View File

@ -307,7 +307,7 @@ Result usbHsIfCtrlXfer(UsbHsClientIfSession* s, u8 bmRequestType, u8 bRequest, u
rc = _usbHsIfCtrlXferAsync(s, bmRequestType, bRequest, wValue, wIndex, wLength, buffer);
if (R_FAILED(rc)) return rc;
rc = eventWait(&s->eventCtrlXfer, U64_MAX);
rc = eventWait(&s->eventCtrlXfer, UINT64_MAX);
if (R_FAILED(rc)) return rc;
eventClear(&s->eventCtrlXfer);
@ -429,7 +429,7 @@ Result usbHsEpPostBuffer(UsbHsClientEpSession* s, void* buffer, u32 size, u32* t
rc = _usbHsEpPostBufferAsync(s, buffer, size, 0, &xferId);
if (R_FAILED(rc)) return rc;
rc = eventWait(&s->eventXfer, U64_MAX);
rc = eventWait(&s->eventXfer, UINT64_MAX);
if (R_FAILED(rc)) return rc;
eventClear(&s->eventXfer);