2 .\" Copyright (c) 2009 Linux Foundation, written by Michael Kerrisk
3 .\" <mtk.manpages@gmail.com>
5 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
7 .TH pthread_kill_other_threads_np 3 (date) "Linux man-pages (unreleased)"
9 pthread_kill_other_threads_np \- terminate all other threads in process
12 .RI ( libpthread ", " \-lpthread )
15 .B #include <pthread.h>
17 .B void pthread_kill_other_threads_np(void);
20 .BR pthread_kill_other_threads_np ()
21 has an effect only in the LinuxThreads threading implementation.
22 On that implementation,
23 calling this function causes the immediate termination of
24 all threads in the application,
25 except the calling thread.
26 The cancelation state and cancelation type of the
27 to-be-terminated threads are ignored,
28 and the cleanup handlers are not called in those threads.
30 .\" Available since glibc 2.0
32 For an explanation of the terms used in this section, see
40 Interface Attribute Value
42 .BR pthread_kill_other_threads_np ()
43 T} Thread safety MT-Safe
49 This function is a nonstandard GNU extension;
50 hence the suffix "_np" (nonportable) in the name.
52 .BR pthread_kill_other_threads_np ()
53 is intended to be called just before a thread calls
55 or a similar function.
56 This function is designed to address a limitation in the obsolete
57 LinuxThreads implementation whereby the other threads of an application
58 are not automatically terminated (as POSIX.1-2001 requires) during
61 In the NPTL threading implementation,
62 .BR pthread_kill_other_threads_np ()
63 exists, but does nothing.
64 (Nothing needs to be done,
65 because the implementation does the right thing during an
69 .BR pthread_cancel (3),
70 .BR pthread_setcancelstate (3),
71 .BR pthread_setcanceltype (3),