Use this, to go back to the queue after the Request. */
| 86 | Use this, to go back to the queue after the Request. |
| 87 | */ |
| 88 | void QueueSystem::Resume() { |
| 89 | if (queueEntries.empty()) return; |
| 90 | |
| 91 | ExclusiveMode::Enter(); |
| 92 | QueueSystem::Wait = false; |
| 93 | QueueRuns = true; |
| 94 | |
| 95 | if (queueThread) { |
| 96 | threadJoin(queueThread, U64_MAX); |
| 97 | threadFree(queueThread); |
| 98 | queueThread = nullptr; |
| 99 | } |
| 100 | |
| 101 | s32 prio = 0; |
| 102 | svcGetThreadPriority(&prio, CUR_THREAD_HANDLE); |
| 103 | queueThread = threadCreate((ThreadFunc)QueueSystem::QueueHandle, NULL, 64 * 1024, prio - 1, -2, false); |
| 104 | } |
| 105 | |
| 106 | /* |
| 107 | The whole handle. |