pthread_kill_other_threads_np

Section: C Library Functions (3)
Updated: 2025-05-17
Index JM Home Page roff page
 

名前

pthread_kill_other_threads_np - プロセス内の他の全スレッドを終了する  

ライブラリ

POSIX スレッドライブラリ (libpthread,~-lpthread)  

書式

#include <pthread.h>

void pthread_kill_other_threads_np(void);
 

説明

pthread_kill_other_threads_np() has an effect only in the LinuxThreads threading implementation. On that implementation, calling this function causes the immediate termination of all threads in the application, except the calling thread. The cancelation state and cancelation type of the to-be-terminated threads are ignored, and the cleanup handlers are not called in those threads.  

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
pthread_kill_other_threads_np() Thread safetyMT-Safe
 

バージョン

NPTL スレッド実装では、 pthread_kill_other_threads_np() は存在するが、 何もしない(NPTL 実装は execve(2) の際に適切な動作をするので、 何もする必要がないということだ)。  

標準規格

GNU; そのため、名前に "_np" (nonportable; 移植性がない) という接尾辞が付いている。  

歴史

glibc 2.0  

注意

pthread_kill_other_threads_np() は、 スレッドが execve(2) や同様の関数を呼び出す直前に 呼ばれることを目的として用意されている。 この関数は、(廃止予定の) LinuxThreads スレッド実装における、 execve(2) の際にアプリケーションの他のスレッドが自動的に 終了されないという制限を解決するために設計された。  

関連項目

execve(2), pthread_cancel(3), pthread_setcancelstate(3), pthread_setcanceltype(3), pthreads(7)


 

Index

名前
ライブラリ
書式
説明
属性
バージョン
標準規格
歴史
注意
関連項目

This document was created by man2html, using the manual pages.