---
name: "pthread_self"
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_self/3thr"
---

# pthread\_self(3thr)

return identifier of current thread

## NAME

pthread\_self - return identifier of current thread

## SYNOPSIS

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

**pthread\_t pthread\_self(void);**

## DESCRIPTION

**pthread\_self** return the thread identifier for the calling thread.

## AUTHOR

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

## SEE ALSO

[**pthread\_equal**(3)](/pthread_equal/3.md), [**pthread\_join**(3)](/pthread_join/3.md), [**pthread\_detach**(3)](/pthread_detach/3.md), [**pthread\_setschedparam**(3)](/pthread_setschedparam/3.md), [**pthread\_getschedparam**(3)](/pthread_getschedparam/3.md).
