pthread_self(3)

pthread_self3

Get the calling thread's id

Usage

#include <pthread.h>

pthread_t

pthread_self(void);

Overview

The pthread_self() function returns the thread ID of the calling thread.

Return values

The pthread_self() function returns the thread ID of the calling thread.

Errors

None.

Releases

149 releases since Mac OS X 10.2; the text changed 1 time.

  1. 10.2–10.11.6
  2. 10.12–26.5

Standards

The pthread_self() function conforms to ISO/IEC 9945-1:1996 (“POSIX.1”).

From libpthread 539.100.4 in macOS 26.5. Parsed by carta from the page's mdoc source.