PZ_Lock(threadLock); slot->state = rs_zombie;
PZ_Lock(qLock);
thread_wrapper(void * arg){    perThread * slot = (perThread *)arg;    slot->rv = (* slot->startFunc)(slot->a, slot->b, slot->c);    /* notify the thread exit handler. */    PZ_Lock(threadLock);    slot->state = rs_zombie;    --threadCount;    PZ_NotifyAllCondVar(threadQ);    PZ_Unlock(threadLock);}