#include #include #include "thread_internal.h" void pthread_testcancel() { _pthread_descr thread; __THREAD_INIT(); thread=__thread_self(); if (thread->canceled) { pthread_exit(PTHREAD_CANCELED); } }