gettid()

Get the thread ID

Synopsis:

#include <process.h>

int gettid( void );

Since:

BlackBerry 10.0.0

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:

QNX Neutrino

Safety:  
Cancellation point No
Interrupt handler No
Signal handler Yes
Thread Yes

Last modified: 2014-06-24



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus