summaryrefslogtreecommitdiffstats
path: root/mdk-stage1/dietlibc/libpthread/pthread_testcancel.c
blob: 68f91e74331f9a558a93df3164a67d9674d17eb1 (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->canceled) {
    pthread_exit(PTHREAD_CANCELED);
  }
}