1 .\" $FreeBSD: src/share/man/man3/pthread_cancel.3,v 1.13 2007/10/22 10:08:00 ru Exp $
7 .Nd cancel execution of a thread
13 .Fn pthread_cancel "pthread_t thread"
17 function requests that
20 The target thread's cancelability state and type determines
21 when the cancellation takes effect.
22 When the cancellation is acted on,
23 the cancellation cleanup handlers for
26 When the last cancellation cleanup handler returns,
27 the thread-specific data destructor functions will be called for
29 When the last destructor function returns,
33 The cancellation processing in the target thread runs asynchronously with
34 respect to the calling thread returning from
39 is made available to any threads joining with the target.
43 expands to a constant expression of type
45 whose value matches no pointer to an object in memory nor the value
50 functions will return zero.
51 Otherwise an error number will be returned to
56 function will fail if:
59 No thread could be found corresponding to that specified by the given
63 .Xr pthread_cleanup_pop 3 ,
64 .Xr pthread_cleanup_push 3 ,
67 .Xr pthread_setcancelstate 3 ,
68 .Xr pthread_setcanceltype 3 ,
69 .Xr pthread_testcancel 3
76 This manual page was written by
77 .An David Leonard Aq Mt d@openbsd.org