| 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 |
no outgoing calls
no test coverage detected