| 532 | } |
| 533 | |
| 534 | void lowerPriority(void) override |
| 535 | { |
| 536 | // The thread pool spawns the worker one step ABOVE the main thread |
| 537 | // (prio-1), so a syscall-free compute loop would starve the UI thread |
| 538 | // outright; +2 lands it just below main, letting the UI thread always |
| 539 | // preempt to sample the hold-B abort. |
| 540 | s32 prio = 0; |
| 541 | if (R_SUCCEEDED(svcGetThreadPriority(&prio, CUR_THREAD_HANDLE))) { |
| 542 | svcSetThreadPriority(CUR_THREAD_HANDLE, prio + 2); |
| 543 | } |
| 544 | } |
| 545 | |
| 546 | private: |
| 547 | int freeSlot(void) const |
no outgoing calls
no test coverage detected