Thread cancellation features. More...
Thread cancellation features.
Definition in file pthread_cancellation.h.
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... | |
int pthread_cancel | ( | pthread_t | th | ) |
Tells a pthread that it should exit.
A pthread th
can call pthread_testcancel(). If pthread_cancel(th) was called before, it will exit then.
[in] | th | Pthread to tell that it should cancel. |
-1
, this invocation fails int pthread_setcancelstate | ( | int | state, |
int * | oldstate | ||
) |
Cancellation point are not supported, yet.
[in] | state | Unused |
[out] | oldstate | Unused |
-1
, this invocation fails int pthread_setcanceltype | ( | int | type, |
int * | oldtype | ||
) |
Cancellation point are not supported, yet.
[in] | type | Unused |
[out] | oldtype | Unused |
-1
, this invocation fails void pthread_testcancel | ( | void | ) |
Exit the current pthread if pthread_cancel() was called for this thread before.
If pthread_cancel() called before, the current thread exits with with the code PTHREAD_CANCELED.