| 336 | } |
| 337 | |
| 338 | void lowerPriority(void) override |
| 339 | { |
| 340 | // The thread pool spawns the worker one step ABOVE the main thread |
| 341 | // (prio-1), so a syscall-free compute loop would starve the UI thread |
| 342 | // outright; +2 lands it just below main, letting the UI thread always |
| 343 | // preempt to sample the hold-B abort. |
| 344 | s32 prio = 0; |
| 345 | if (R_SUCCEEDED(svcGetThreadPriority(&prio, CUR_THREAD_HANDLE))) { |
| 346 | svcSetThreadPriority(CUR_THREAD_HANDLE, prio + 2); |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | private: |
| 351 | int freeSlot(void) const |
no outgoing calls
no test coverage detected