1 .\" Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
2 .\" <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .TH PTHREAD_EQUAL 3 2021-03-22 "Linux man-pages (unreleased)"
8 pthread_equal \- compare thread IDs
11 .RI ( libpthread ", " \-lpthread )
14 .B #include <pthread.h>
16 .BI "int pthread_equal(pthread_t " t1 ", pthread_t " t2 );
21 function compares two thread identifiers.
23 If the two thread IDs are equal,
25 returns a nonzero value; otherwise, it returns 0.
27 This function always succeeds.
29 For an explanation of the terms used in this section, see
37 Interface Attribute Value
40 T} Thread safety MT-Safe
46 POSIX.1-2001, POSIX.1-2008.
50 function is necessary because thread IDs should be considered opaque:
51 there is no portable way for applications to directly compare two
55 .BR pthread_create (3),