release(&handle->h_spinlock);
__pthread_unlock(&handle->h_lock);
int pthread_join(pthread_t thread_id, void ** thread_return){  volatile pthread_descr self = thread_self();  struct pthread_request request;  pthread_handle handle = thread_handle(thread_id);  pthread_descr th;  acquire(&handle->h_spinlock);  if (invalid_handle(handle, thread_id)) {    release(&handle->h_spinlock);    return ESRCH;  }  th = handle->h_descr;  if (th == self) {    release(&handle->h_spinlock);    return EDEADLK;  }  /* If detached or already joined, error */  if (th->p_detached || th->p_joining != NULL) {    release(&handle->h_spinlock);    return EINVAL;  }  /* If not terminated yet, suspend ourselves. */  if (! th->p_terminated) {    th->p_joining = self;    release(&handle->h_spinlock);    suspend_with_cancellation(self);    /* This is a cancellation point */    if (self->p_canceled && self->p_cancelstate == PTHREAD_CANCEL_ENABLE) {      th->p_joining = NULL;      pthread_exit(PTHREAD_CANCELED);    }    acquire(&handle->h_spinlock);  }  /* Get return value */  if (thread_return != NULL) *thread_return = th->p_retval;  release(&handle->h_spinlock);  /* Send notification to thread manager */  if (__pthread_manager_request >= 0) {    request.req_thread = self;    request.req_kind = REQ_FREE;    request.req_args.free.thread = th;    __libc_write(__pthread_manager_request,		 (char *) &request, sizeof(request));  }  return 0;}