7 .Nd cancel execution of a thread
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
54 function will fail if:
57 No thread could be found corresponding to that specified by the given
61 .Xr pthread_cleanup_pop 3 ,
62 .Xr pthread_cleanup_push 3 ,
65 .Xr pthread_setcancelstate 3 ,
66 .Xr pthread_setcanceltype 3 ,
67 .Xr pthread_testcancel 3
74 This manual page was written by
75 .An David Leonard Aq Mt d@openbsd.org