]>
Commit | Line | Data |
---|---|---|
a1eaacb1 | 1 | '\" t |
8c80f3c6 MK |
2 | .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk |
3 | .\" <mtk.manpages@gmail.com> | |
4 | .\" | |
5fbde956 | 5 | .\" SPDX-License-Identifier: Linux-man-pages-copyleft |
8c80f3c6 | 6 | .\" |
4c1c5274 | 7 | .TH pthread_equal 3 (date) "Linux man-pages (unreleased)" |
8c80f3c6 | 8 | .SH NAME |
67ca98a7 | 9 | pthread_equal \- compare thread IDs |
49474d23 AC |
10 | .SH LIBRARY |
11 | POSIX threads library | |
8fc3b2cf | 12 | .RI ( libpthread ", " \-lpthread ) |
8c80f3c6 MK |
13 | .SH SYNOPSIS |
14 | .nf | |
15 | .B #include <pthread.h> | |
dbfe9c70 | 16 | .PP |
8c80f3c6 | 17 | .BI "int pthread_equal(pthread_t " t1 ", pthread_t " t2 ); |
6030f2d8 | 18 | .fi |
8c80f3c6 MK |
19 | .SH DESCRIPTION |
20 | The | |
21 | .BR pthread_equal () | |
22 | function compares two thread identifiers. | |
23 | .SH RETURN VALUE | |
24 | If the two thread IDs are equal, | |
25 | .BR pthread_equal () | |
c7094399 | 26 | returns a nonzero value; otherwise, it returns 0. |
8c80f3c6 MK |
27 | .SH ERRORS |
28 | This function always succeeds. | |
6b0949f0 | 29 | .SH ATTRIBUTES |
6333d7c3 PH |
30 | For an explanation of the terms used in this section, see |
31 | .BR attributes (7). | |
32 | .TS | |
33 | allbox; | |
c466875e | 34 | lbx lb lb |
6333d7c3 PH |
35 | l l l. |
36 | Interface Attribute Value | |
37 | T{ | |
9e54434e BR |
38 | .na |
39 | .nh | |
6b0949f0 | 40 | .BR pthread_equal () |
6333d7c3 PH |
41 | T} Thread safety MT-Safe |
42 | .TE | |
c466875e | 43 | .sp 1 |
3113c7f3 | 44 | .SH STANDARDS |
4131356c AC |
45 | POSIX.1-2008. |
46 | .SH HISTORY | |
47 | POSIX.1-2001. | |
8c80f3c6 MK |
48 | .SH NOTES |
49 | The | |
50 | .BR pthread_equal () | |
51 | function is necessary because thread IDs should be considered opaque: | |
52 | there is no portable way for applications to directly compare two | |
53 | .I pthread_t | |
54 | values. | |
55 | .SH SEE ALSO | |
56 | .BR pthread_create (3), | |
57 | .BR pthread_self (3), | |
58 | .BR pthreads (7) |