thr_self

Returns the thread identifier for the calling thread.

Library:LibC
Classification:UNIX International
Service:Threads

Syntax

  #include <thread.h>
   
  thread_t thr_self ( void );
  

Return Values

Returns the identifier of the calling thread.

Remarks

The thread ID is unique to the process and is not a system-wide unique ID. To get a system-wide ID, you can combine the thread ID with the process ID.

See Also