_PR_AssignLock(thread->wait.lock);
_PR_UnblockWaiters(thread->wait.lock);
static void _PR_Resume(PRThread *thread){    PRThreadPriority pri;    PRIntn is;    PRThread *me = _PR_MD_CURRENT_THREAD();    if (!_PR_IS_NATIVE_THREAD(me))    _PR_INTSOFF(is);    _PR_THREAD_LOCK(thread);    switch (thread->state) {      case _PR_SUSPENDED:        thread->state = _PR_RUNNABLE;        thread->flags &= ~_PR_SUSPENDING;        if (!_PR_IS_NATIVE_THREAD(thread)) {            _PR_MISCQ_LOCK(thread->cpu);            _PR_DEL_SUSPENDQ(thread);            _PR_MISCQ_UNLOCK(thread->cpu);            pri = thread->priority;            _PR_RUNQ_LOCK(thread->cpu);            _PR_ADD_RUNQ(thread, thread->cpu, pri);            _PR_RUNQ_UNLOCK(thread->cpu);            if (pri > _PR_MD_CURRENT_THREAD()->priority) {                if (!_PR_IS_NATIVE_THREAD(me))                    _PR_SET_RESCHED_FLAG();            }        } else {            PR_ASSERT(0);        }        break;      case _PR_IO_WAIT:      case _PR_COND_WAIT:        thread->flags &= ~_PR_SUSPENDING;/*      PR_ASSERT(thread->wait.monitor->stickyCount == 0); */        break;      case _PR_LOCK_WAIT:       {        PRLock *wLock = thread->wait.lock;        thread->flags &= ~_PR_SUSPENDING;         _PR_LOCK_LOCK(wLock);        if (thread->wait.lock->owner == 0) {            _PR_AssignLock(thread->wait.lock);        }        _PR_LOCK_UNLOCK(wLock);        break;      }      case _PR_RUNNABLE:        break;      case _PR_RUNNING:        /*         * The thread being suspended should be a LOCAL thread with         * _pr_numCPUs == 1. Hence, the thread cannot be in RUNNING state         */        PR_ASSERT(0);        break;      default:    /*     * thread should have been in one of the above-listed blocked states     * (_PR_JOIN_WAIT, _PR_IO_WAIT, _PR_UNBORN, _PR_DEAD_STATE)     */        PR_Abort();    }    _PR_THREAD_UNLOCK(thread);    if (!_PR_IS_NATIVE_THREAD(me))        _PR_INTSON(is);}