gettid()
QNX SDP8.0C Library ReferenceAPIDeveloper
Get the thread ID
Synopsis:
#include <process.h>
int gettid( void );
Library:
libc
Use the -l c option to qcc to link against this library. This library is usually included automatically.
Description:
The gettid() function gets the thread ID for the calling thread.
Returns:
The thread ID.
Examples:
#include <stdio.h>
#include <stdlib.h>
#include <process.h>
int main ( void )
{
printf( "I'm thread %d\n", gettid() );
return EXIT_SUCCESS;
}
Classification:
Safety: | |
---|---|
Cancellation point | No |
Signal handler | Yes |
Thread | Yes |
Page updated: