release(&cond->c_spinlock);
pthread_cond_timedwait_relative(pthread_cond_t *cond,				pthread_mutex_t *mutex,				const struct timespec * reltime){  volatile pthread_descr self = thread_self();  sigset_t unblock, initial_mask;  int retsleep;  sigjmp_buf jmpbuf;  /* Wait on the condition */  acquire(&cond->c_spinlock);  enqueue(&cond->c_waiting, self);  release(&cond->c_spinlock);  pthread_mutex_unlock(mutex);  /* Set up a longjmp handler for the restart signal */  /* No need to save the signal mask, since PTHREAD_SIG_RESTART will be     blocked when doing the siglongjmp, and we'll just leave it blocked. */  if (sigsetjmp(jmpbuf, 0) == 0) {    self->p_signal_jmp = &jmpbuf;    self->p_signal = 0;    /* Check for cancellation */    if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {      retsleep = -1;    } else {      /* Unblock the restart signal */      sigemptyset(&unblock);      sigaddset(&unblock, PTHREAD_SIG_RESTART);      sigprocmask(SIG_UNBLOCK, &unblock, &initial_mask);      /* Sleep for the required duration */      retsleep = __libc_nanosleep(reltime, NULL);      /* Block the restart signal again */      sigprocmask(SIG_SETMASK, &initial_mask, NULL);    }  } else {    retsleep = -1;  }  self->p_signal_jmp = NULL;  /* Here, either the condition was signaled (self->p_signal != 0)                   or we got canceled (self->p_canceled != 0)                   or the timeout occurred (retsleep == 0)                   or another interrupt occurred (retsleep == -1) */  /* Re-acquire the spinlock */  acquire(&cond->c_spinlock);  /* This is a cancellation point */  if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {    remove_from_queue(&cond->c_waiting, self);    release(&cond->c_spinlock);    pthread_mutex_lock(mutex);    pthread_exit(PTHREAD_CANCELED);  }  /* If not signaled: also remove ourselves and return an error code */  if (self->p_signal == 0) {    remove_from_queue(&cond->c_waiting, self);    release(&cond->c_spinlock);    pthread_mutex_lock(mutex);    return retsleep == 0 ? ETIMEDOUT : EINTR;  }  /* Otherwise, return normally */  release(&cond->c_spinlock);  pthread_mutex_lock(mutex);  return 0;}