OSDN Git Service

(split) LDP: Release pages for LDP v3.39.
[linuxjm/LDP_man-pages.git] / release / man2 / gettid.2
1 .\" Hey Emacs! This file is -*- nroff -*- source.
2 .\"
3 .\" Copyright 2003 Abhijit Menon-Sen <ams@wiw.org>
4 .\" and Copyright (C) 2008 Michael Kerrisk <mtk.manpages@gmail.com>
5 .\"
6 .\" Permission is granted to make and distribute verbatim copies of this
7 .\" manual provided the copyright notice and this permission notice are
8 .\" preserved on all copies.
9 .\"
10 .\" Permission is granted to copy and distribute modified versions of this
11 .\" manual under the conditions for verbatim copying, provided that the
12 .\" entire resulting derived work is distributed under the terms of a
13 .\" permission notice identical to this one.
14 .\"
15 .\" Since the Linux kernel and libraries are constantly changing, this
16 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
17 .\" responsibility for errors or omissions, or for damages resulting from
18 .\" the use of the information contained herein.  The author(s) may not
19 .\" have taken the same level of care in the production of this manual,
20 .\" which is licensed free of charge, as they might when working
21 .\" professionally.
22 .\"
23 .\" Formatted or processed versions of this manual, if unaccompanied by
24 .\" the source, must acknowledge the copyright and authors of this work.
25 .\"
26 .\"*******************************************************************
27 .\"
28 .\" This file was generated with po4a. Translate the source file.
29 .\"
30 .\"*******************************************************************
31 .TH GETTID 2 2008\-04\-14 Linux "Linux Programmer's Manual"
32 .SH 名前
33 gettid \- スレッドID を取得する
34 .SH 書式
35 .nf
36 \fB#include <sys/types.h>\fP
37 .sp
38 \fBpid_t gettid(void);\fP
39 .fi
40 .SH 説明
41 \fBgettid\fP()  は呼び出し元のスレッド ID (TID) を返す。 シングルスレッドのプロセスでは、スレッド ID は
42 (\fBgetpid\fP(2)  が返すプロセス ID (PID) と等しい。 マルチスレッドのプロセスでは、全てのスレッドは同じ PID を持つが、
43 それぞれのスレッドは一意な TID を持つ。 さらなる詳細は、 \fBclone\fP(2)  の \fBCLONE_THREAD\fP
44 についての議論を参照すること。
45 .SH 返り値
46 成功の場合、呼び出し元のプロセスのスレッドID を返す。
47 .SH エラー
48 このコールは常に成功する。
49 .SH バージョン
50 \fBgettid\fP()  システムコールは、カーネル 2.4.11 の Linux で初めて登場した。
51 .SH 準拠
52 \fBgettid\fP()  は Linux 固有であり、 移植を想定したプログラムでは使用すべきではない。
53 .SH 注意
54 .\" FIXME See http://sourceware.org/bugzilla/show_bug.cgi?id=6399
55 .\" "gettid() should have a wrapper"
56 glibc はこのシステムコールに対するラッパー関数を提供していない。 このシステムコールは呼び出すには \fBsyscall\fP(2)  を使うこと。
57
58 このシステムコールが返すスレッド ID は POSIX スレッド ID (\fBpthread_self\fP(3)  が返す曖昧な値) と同じものではない。
59 .SH 関連項目
60 \fBclone\fP(2), \fBfork\fP(2), \fBgetpid\fP(2)