void kscrashsentry_resumeThreads(void) { KSLOG_DEBUG("Resuming threads."); if(g_threads_are_running) { KSLOG_DEBUG("Threads already resumed."); return; } if(g_context != NULL) { int numThreads = sizeof(g_context->reservedThreads) / sizeof(g_context->reservedThreads[0]); KSLOG_DEBUG("Resuming all threads except for %d reserved threads.", numThreads); if(ksmach_resumeAllThreadsExcept(g_context->reservedThreads, numThreads)) { KSLOG_DEBUG("Resume successful."); g_threads_are_running = true; } } else { KSLOG_DEBUG("Resuming all threads."); if(ksmach_resumeAllThreads()) { KSLOG_DEBUG("Resume successful."); g_threads_are_running = true; } } KSLOG_DEBUG("Resume complete."); }
bool ksmach_resumeAllThreads(void) { return ksmach_resumeAllThreadsExcept(NULL, 0); }