MCPcopy Create free account
hub / github.com/XorTroll/uLaunch / LoopWaitStorageFunctionImpl

Function LoopWaitStorageFunctionImpl

libs/uCommon/source/ul/smi/smi_Protocol.cpp:13–33  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11 namespace impl {
12
13 Result LoopWaitStorageFunctionImpl(StorageFunction st_fn, AppletStorage *st, const bool wait) {
14 if(!wait) {
15 return st_fn(st);
16 }
17
18 u32 count = 0;
19 while(true) {
20 if(R_SUCCEEDED(st_fn(st))) {
21 break;
22 }
23
24 count++;
25 if(count > MaxRetryCount) {
26 return ResultWaitTimeout;
27 }
28
29 svcSleepThread(10'000'000);
30 }
31
32 return ResultSuccess;
33 }
34
35 }
36

Callers 4

PopStorageFunction · 0.85
PushStorageFunction · 0.85
PopStorageFunction · 0.85
PushStorageFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected