---
name: "pthread_equal"
section: "3thr"
platform: "linux"
package: "glibc-doc"
version: "2.1.3-20"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/pthread_equal/3thr"
---

# pthread\_equal(3thr)

compare two thread identifiers

## NAME

pthread\_equal - compare two thread identifiers

## SYNOPSIS

**#include \<pthread.h\>**

**int pthread\_equal(pthread\_t** *thread1***, pthread\_t** *thread2***);**

## DESCRIPTION

**pthread\_equal** determines if two thread identifiers refer to the same thread.

## RETURN VALUE

A non-zero value is returned if  *thread1* and  *thread2* refer to the same thread. Otherwise, 0 is returned.

## AUTHOR

Xavier Leroy \<Xavier.Leroy@inria.fr\>

## SEE ALSO

[**pthread\_self**(3)](/pthread_self/3.md).
