summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c
blob: 4151faca365f34667c5bc786c10477675bcd7be5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <errno.h>

#include <pthread.h>
#include "thread_internal.h"

void pthread_testcancel()
{
  _pthread_descr thread;
  __THREAD_INIT();

  thread=__thread_self();

  if (thread && thread->canceled) {
    pthread_exit(PTHREAD_CANCELED);
  }
}