The friendly Operating System for the Internet of Things
pthread_cancellation.h File Reference

Thread cancellation features. More...

Detailed Description

None of these functions are implemented, yet.
Do not include this header file directly, but pthread.h.

Definition in file pthread_cancellation.h.

+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

#define PTHREAD_CANCELED   ((void *) -2)
 Thread exit status after a canceled thread has terminated.
int pthread_setcancelstate (int state, int *oldstate)
 Cancellation point are not supported, yet. More...
int pthread_setcanceltype (int type, int *oldtype)
 Cancellation point are not supported, yet. More...
int pthread_cancel (pthread_t th)
 Tells a pthread that it should exit. More...
void pthread_testcancel (void)
 Exit the current pthread if pthread_cancel() was called for this thread before. More...

Function Documentation

int pthread_cancel ( pthread_t  th)
Cancellation points are not supported, yet.

A pthread th can call pthread_testcancel(). If pthread_cancel(th) was called before, it will exit then.

[in]thPthread to tell that it should cancel.
-1, this invocation fails
int pthread_setcancelstate ( int  state,
int *  oldstate 
-1, this invocation fails
int pthread_setcanceltype ( int  type,
int *  oldtype 
-1, this invocation fails
void pthread_testcancel ( void  )

If pthread_cancel() called before, the current thread exits with with the code PTHREAD_CANCELED.