1 .\" $NetBSD: pthread_cancel.3,v 1.2 2003/06/08 06:44:29 thorpej Exp $
3 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\" notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\" notice, this list of conditions and the following disclaimer in the
12 .\" documentation and/or other materials provided with the distribution.
13 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
14 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
15 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
16 .\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
17 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
18 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
19 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
20 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
21 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
22 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
23 .\" POSSIBILITY OF SUCH DAMAGE.
25 .\" $FreeBSD: src/lib/libpthread/man/pthread_cancel.3,v 1.7 2002/09/16 19:29:28 mini Exp $
31 .Nd cancel execution of a thread
37 .Fn pthread_cancel "pthread_t thread"
41 function requests that
44 The target thread's cancelability state and type determines
45 when the cancellation takes effect.
46 When the cancellation is acted on,
47 the cancellation cleanup handlers for
50 When the last cancellation cleanup handler returns,
51 the thread-specific data destructor functions will be called for
53 When the last destructor function returns,
57 The cancellation processing in the target thread runs asynchronously with
58 respect to the calling thread returning from
63 is made available to any threads joining with the target.
67 expands to a constant expression of type
69 whose value matches no pointer to an object in memory nor the value
74 functions will return zero.
75 Otherwise an error number will be returned to
82 No thread could be found corresponding to that specified by the given
86 .Xr pthread_cleanup_pop 3 ,
87 .Xr pthread_cleanup_push 3 ,
90 .Xr pthread_setcancelstate 3 ,
91 .Xr pthread_setcanceltype 3 ,
92 .Xr pthread_testcancel 3
98 This man page was written by
99 .An David Leonard Aq d@openbsd.org