pthread_exit(PTHREAD_CANCELED);
__pthread_do_exit(PTHREAD_CANCELED, CURRENT_STACK_FRAME);
int pthread_setcanceltype(int type, int * oldtype){  pthread_descr self = thread_self();  if (type < PTHREAD_CANCEL_DEFERRED || type > PTHREAD_CANCEL_ASYNCHRONOUS)    return EINVAL;  if (oldtype != NULL) *oldtype = THREAD_GETMEM(self, p_canceltype);  THREAD_SETMEM(self, p_canceltype, type);  if (THREAD_GETMEM(self, p_canceled) &&      THREAD_GETMEM(self, p_cancelstate) == PTHREAD_CANCEL_ENABLE &&      THREAD_GETMEM(self, p_canceltype) == PTHREAD_CANCEL_ASYNCHRONOUS)    pthread_exit(PTHREAD_CANCELED);  return 0;}