pthread_cancellation.h¶
Thread cancellation features.
Note
None of these functions are implemented, yet.
Note
Do not include this header file directly, but pthread.h.
-
PTHREAD_CANCEL_DISABLE
¶ 1
0
-
PTHREAD_CANCEL_ENABLE
¶ 1
1
-
PTHREAD_CANCEL_DEFERRED
¶ 1
0
-
PTHREAD_CANCEL_ASYNCHRONOUS
¶ 1
1
-
PTHREAD_CANCELED
¶ Thread exit status after a canceled thread has terminated.
1
((void *) -2)
-
int
pthread_setcancelstate
(int state, int * oldstate)¶ Cancellation point are not supported, yet.
Parameters
state: Unused oldstate: Unused Return values
-1
, this invocation fails
-
int
pthread_setcanceltype
(int type, int * oldtype)¶ Cancellation point are not supported, yet.
Parameters
type: Unused oldtype: Unused Return values
-1
, this invocation fails
-
int
pthread_cancel
(pthread_threading.h::pthread_t
th)¶ Tells a pthread that it should exit.
Note
Cancellation points are not supported, yet.
th
can callpthread_cancellation.h::pthread_testcancel()
. If pthread_cancel(th) was called before, it will exit then.Parameters
th: Pthread to tell that it should cancel. Return values
-1
, this invocation fails
-
void
pthread_testcancel
(void)¶ Exit the current pthread if
pthread_cancellation.h::pthread_cancel()
was called for this thread before.If
pthread_cancellation.h::pthread_cancel()
called before, the current thread exits with with the codepthread_cancellation.h::PTHREAD_CANCELED
.