OSDN Git Service

(split) LDP: Update original to LDP v3.38.
[linuxjm/LDP_man-pages.git] / original / man3 / pthread_equal.3
1 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2 .\"     <mtk.manpages@gmail.com>
3 .\"
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\"
24 .TH PTHREAD_EQUAL 3 2009-03-30 "Linux" "Linux Programmer's Manual"
25 .SH NAME
26 pthread_equal \- compare thread IDs
27 .SH SYNOPSIS
28 .nf
29 .B #include <pthread.h>
30
31 .BI "int pthread_equal(pthread_t " t1 ", pthread_t " t2 );
32 .sp
33 Compile and link with \fI\-pthread\fP.
34 .fi
35 .SH DESCRIPTION
36 The
37 .BR pthread_equal ()
38 function compares two thread identifiers.
39 .SH RETURN VALUE
40 If the two thread IDs are equal,
41 .BR pthread_equal ()
42 returns a nonzero value; otherwise, it returns 0.
43 .SH ERRORS
44 This function always succeeds.
45 .SH CONFORMING TO
46 POSIX.1-2001.
47 .SH NOTES
48 The
49 .BR pthread_equal ()
50 function is necessary because thread IDs should be considered opaque:
51 there is no portable way for applications to directly compare two
52 .I pthread_t
53 values.
54 .SH SEE ALSO
55 .BR pthread_create (3),
56 .BR pthread_self (3),
57 .BR pthreads (7)