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

Thread cancellation features. More...

Detailed Description

Note
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_CANCEL_DISABLE   0
 
#define PTHREAD_CANCEL_ENABLE   1
 
#define PTHREAD_CANCEL_DEFERRED   0
 
#define PTHREAD_CANCEL_ASYNCHRONOUS   1
 
#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)
Note
Cancellation points are not supported, yet.

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

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

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