| 497 | } |
| 498 | |
| 499 | void lowerPriority(void) override |
| 500 | { |
| 501 | // The thread pool spawns the worker one step ABOVE the main thread |
| 502 | // (prio-1), so a syscall-free compute loop would starve the UI thread |
| 503 | // outright; +2 lands it just below main, letting the UI thread always |
| 504 | // preempt to sample the hold-B abort. |
| 505 | s32 prio = 0; |
| 506 | if (R_SUCCEEDED(svcGetThreadPriority(&prio, CUR_THREAD_HANDLE))) { |
| 507 | svcSetThreadPriority(CUR_THREAD_HANDLE, prio + 2); |
| 508 | } |
| 509 | } |
| 510 | |
| 511 | private: |
| 512 | int freeSlot(void) const |
no outgoing calls
no test coverage detected