I'm very pleased to announce the release of our new website and documentation using the new toolchain with Hugo and AsciiDoctor. To get more information about the new toolchain please read the FreeBSD Documentation Project Primer[1], Hugo docs[2] and AsciiDoctor docs[3]. Acknowledgment: Benedict Reuschling <bcr@> Glen Barber <gjb@> Hiroki Sato <hrs@> Li-Wen Hsu <lwhsu@> Sean Chittenden <seanc@> The FreeBSD Foundation [1] https://docs.FreeBSD.org/en/books/fdp-primer/ [2] https://gohugo.io/documentation/ [3] https://docs.asciidoctor.org/home/ Approved by: doceng, core
87 lines
3.1 KiB
Groff
87 lines
3.1 KiB
Groff
.\" Copyright (c) 1996-1998 John Birrell <jb@cimlogic.com.au>.
|
|
.\" All rights reserved.
|
|
.\"
|
|
.\" Redistribution and use in source and binary forms, with or without
|
|
.\" modification, are permitted provided that the following conditions
|
|
.\" are met:
|
|
.\" 1. Redistributions of source code must retain the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer.
|
|
.\" 2. Redistributions in binary form must reproduce the above copyright
|
|
.\" notice, this list of conditions and the following disclaimer in the
|
|
.\" documentation and/or other materials provided with the distribution.
|
|
.\" 3. All advertising materials mentioning features or use of this software
|
|
.\" must display the following acknowledgement:
|
|
.\" This product includes software developed by John Birrell.
|
|
.\" 4. Neither the name of the author nor the names of any co-contributors
|
|
.\" may be used to endorse or promote products derived from this software
|
|
.\" without specific prior written permission.
|
|
.\"
|
|
.\" THIS SOFTWARE IS PROVIDED BY JOHN BIRRELL AND CONTRIBUTORS ``AS IS'' AND
|
|
.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
.\" SUCH DAMAGE.
|
|
.\"
|
|
.\" %FreeBSD: src/lib/libc_r/man/pthread_detach.3,v 1.6.2.6 2001/12/17 10:08:26 ru Exp %
|
|
.\"
|
|
.\" $FreeBSD$
|
|
.Dd April 4, 1996
|
|
.Dt PTHREAD_DETACH 3
|
|
.Os
|
|
.Sh 名称
|
|
.Nm pthread_detach
|
|
.Nd スレッドのデタッチ
|
|
.Sh ライブラリ
|
|
.Lb libc_r
|
|
.Sh 書式
|
|
.In pthread.h
|
|
.Ft int
|
|
.Fn pthread_detach "pthread_t thread"
|
|
.Sh 解説
|
|
.Fn pthread_detach
|
|
関数は、スレッドを終了する時にスレッドのための記憶領域
|
|
.Fa thread
|
|
が再生できることを実装に示すために使用されます。
|
|
.Fa thread
|
|
がまだ終了していない場合に、
|
|
.Fn pthread_detach
|
|
はそのスレッド終了させることはありません。
|
|
同じ対象スレッドへの複数回の
|
|
.Fn pthread_detach
|
|
の呼び出しの効果は未規定です。
|
|
.Sh 戻り値
|
|
問題がない場合は、
|
|
.Fn pthread_detach
|
|
関数は 0 を返します。
|
|
問題がある場合は、そのエラーを示すためにエラー番号が返されます。
|
|
この関数は幾つかの草案で規格とされていたようには errno の値を変更しない
|
|
ことに注意してください。
|
|
これらの早期の草案では引数として pthread_t へのポインタも渡していました。
|
|
気を付けてください。
|
|
.Sh エラー
|
|
.Fn pthread_detach
|
|
は以下の場合に失敗します。
|
|
.Bl -tag -width Er
|
|
.It Bq Er EINVAL
|
|
.Fa thread
|
|
によって指定された値が、
|
|
待機されることが可能なスレッドを参照していないことを検出しました。
|
|
.It Bq Er ESRCH
|
|
与えられたスレッド ID,
|
|
.Fa thread
|
|
によって指定されたものと一致するスレッドを見つけることができません。
|
|
.El
|
|
.Pp
|
|
.Sh 関連項目
|
|
.Xr pthread_join 3
|
|
.Sh 規格
|
|
.Fn pthread_detach
|
|
は
|
|
.St -p1003.1-96
|
|
に適合しています。
|