1 .\" $FreeBSD: src/lib/libc_r/man/pthread_cancel.3,v 1.3.2.3 2001/03/06 16:46:08 ru Exp $
7 .Nd cancel execution of a thread
9 .Fd #include <pthread.h>
11 .Fn pthread_cancel "pthread_t thread"
15 function requests that
18 The target thread's cancelability state and type determines
19 when the cancellation takes effect.
20 When the cancellation is acted on,
21 the cancellation cleanup handlers for
24 When the last cancellation cleanup handler returns,
25 the thread-specific data destructor functions will be called for
27 When the last destructor function returns,
31 The cancellation processing in the target thread runs asynchronously with
32 respect to the calling thread returning from
37 is made available to any threads joining with the target.
41 expands to a constant expression of type
43 whose value matches no pointer to an object in memory nor the value
48 functions will return zero.
49 Otherwise an error number will be returned to
56 No thread could be found corresponding to that specified by the given
60 .Xr pthread_cleanup_pop 3 ,
61 .Xr pthread_cleanup_push 3 ,
64 .Xr pthread_setcancelstate 3 ,
65 .Xr pthread_setcanceltype 3 ,
66 .Xr pthread_testcancel 3
72 This man page was written by
73 .An David Leonard Aq d@openbsd.org