pthread_cancel(3T) DG/UX 5.4R3.00 pthread_cancel(3T)
NAME
pthreadcancel - cancel execution of a thread
SYNOPSIS
#include <pthread.h>
int pthreadcancel(pthreadt thread);
where:
thread Thread ID of the target thread
DESCRIPTION
The pthreadcancel() function requests that the thread with thread ID
thread be canceled.
The target thread will accept its cancellation when it notices that
it has been canceled, it has cancellability (interruptibility)
enabled and, either it has asynchronous cancellability, or it has
controlled interruptibility and has called a function that is a
cancellation (interruption) point. Refer to the most recent Posix
1003.4a draft for an up-to-date discussion on cancellation and
cancellation points.
DIAGNOSTICS
Return Value
If successful, pthreadcancel() returns 0. Otherwise, it returns -1
and sets errno to indicate the error.
Errors
For each of the following conditions, pthreadcancel() returns -1 and
sets errno to the corresponding value:
[EINVAL] The specified thread is invalid.
[ESRCH] thread does not specify a currently existing thread.
SEE ALSO
pthreadcleanuppush(3T), pthreadcleanuppop(3T),
pthreadsetintr(3T), pthreadsetintrtype(3T),
pthreadcondtimedwait(3T), pthreadcondwait(3T), pthreadexit(3T),
pthreadjoin(3T), threads(5).
NOTES
The terms "cancellation" and "interruption" are equivalent. Later
drafts of the standard use "cancellation point" instead of
"interruption point." Draft 8 gives a fairly complete listing of all
standard cancellation points.
Licensed material--property of copyright holder(s) 1