thread_is_interrupted
if (thread_is_interrupted(thread, flags)) {
if (thread_is_interrupted(thread, thread->wait.flags)) {