threads: add THREAD_BLOCKED state