HPlogo HP-UX Reference Volume 4 of 5 > p

pthread_self(3T)

Pthread Library
» 

Technical documentation

Complete book in PDF

 » Table of Contents

 » Index

NAME

pthread_self() — obtain the thread ID for the calling thread.

SYNOPSIS

#include <pthread.h>

pthread_t pthread_self(void);

PARAMETERS

None.

DESCRIPTION

pthread_self() returns the thread ID of the calling thread. The thread ID returned is the same ID that is returned in the thread parameter to the creating thread at thread creation time. Thread IDs are guaranteed to be unique only within a process.

RETURN VALUE

pthread_self() always returns the thread ID of the current thread.

ERRORS

None.

AUTHOR

pthread_self() was derived from the IEEE POSIX P1003.1c standard.

STANDARDS CONFORMANCE

pthread_self(): POSIX 1003.1c.

© Hewlett-Packard Development Company, L.P.