release(&cond->c_spinlock);
__pthread_unlock(&cond->c_lock);
int pthread_cond_wait(pthread_cond_t *cond, pthread_mutex_t *mutex){  volatile pthread_descr self = thread_self();  acquire(&cond->c_spinlock);  enqueue(&cond->c_waiting, self);  release(&cond->c_spinlock);  pthread_mutex_unlock(mutex);  suspend_with_cancellation(self);  pthread_mutex_lock(mutex);  /* This is a cancellation point */  if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {    /* Remove ourselves from the waiting queue if we're still on it */    acquire(&cond->c_spinlock);    remove_from_queue(&cond->c_waiting, self);    release(&cond->c_spinlock);    pthread_exit(PTHREAD_CANCELED);  }  return 0;}