Open System Services System Calls Reference Manual (G06.29+, H06.08+, J06.03+)

System Functions (n - p) pthread_equal(2)
NAME
pthread_equal - Compares two thread identifiers
LIBRARY
None. This routine has been implemented as a macro.
SYNOPSIS
#include <pthread.h> | #include <spthread.h>
/* pthread.h is required to use POSIX User Thread Model library */
/* spthread.h is required to use Standard POSIX Threads library */
int pthread_equal(
pthread_t t1,
pthread_t t2);
PARAMETERS
t1 Specifies the first thread identifier to be compared.
t2 Specifies the second thread identifier to be compared.
DESCRIPTION
This macro compares two thread identifiers.
On systems running H06.21 or later H-series RVUs or J06.10 or later J-series RVUs, you can use
either the POSIX User Thread Model library or the Standard POSIX Threads library for threaded
applications.
To use this macro in a threaded application that uses the POSIX User Thread Model library on
systems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the fol-
lowing tasks:
Include the pthread.h header file in the application.
Compile the application using the _PUT_MODEL_ feature test macro or equivalent
compiler command option.
To use this macro in a threaded application that uses the Standard POSIX Threads library on sys-
tems running J06.10 or later RVUs or H06.21 or later RVUs, you must perform all of the follow-
ing tasks:
Include the spthread.h header file in the application.
Compile the application using the _SPT_MODEL_ feature test macro or equivalent
compiler command option.
NOTES
If either t1 or t2 is not a valid thread identifier, this macros behavior is undefined.
RETURN VALUES
Possible return values are:
0 The t1 and t2 parameters do not designate the same object.
Nonzero The t1 and t2 parameters designate the same object.
527186-023 Hewlett-Packard Company 5109