slot->running = rs_zombie;   PR_NotifyCondVar(threadEndQ);
slot->state = rs_zombie; --threadCount; PR_NotifyAllCondVar(threadQ);
thread_wrapper(void * arg){    perThread * slot = (perThread *)arg;    /* wait for parent to finish launching us before proceeding. */    PR_Lock(threadLock);    PR_Unlock(threadLock);    slot->rv = (* slot->startFunc)(slot->a, slot->b, slot->c);    PR_Lock(threadLock);    slot->running = rs_zombie;    /* notify the thread exit handler. */    PR_NotifyCondVar(threadEndQ);    PR_Unlock(threadLock);}