[Go to CFHT Home Page] Man Pages
Back to Software Index  BORDER=0Manpage Top Level
    pthread_self(3T) manual page Table of Contents

Name

pthread_self, thr_self - get calling thread’s ID

Synopsis

Posix

cc [ flag ... ] file ... -lpthread [ library ... ]

#include <pthread.h>
pthread_t pthread_self(void);

typedef unsigned int pthread_t;

Solaris

cc [ flag ... ] file ... -lthread [ library ... ]

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

typedef unsigned int thread_t;

MT-Level

MT-Safe

Description

thr_self() returns the thread ID of the calling thread.

pthread_self() performs the same function as thr_self().

See Also

pthread_create(3T) , pthread_equal(3T)


Table of Contents