thread_check_permissions
if (!thread_check_permissions(currentThread, thread, kernel))
if (thread_is_idle_thread(thread) || !thread_check_permissions(