NAME

PAPI_thread_id - get the thread identifier of the current thread

CONTENTS

Synopsis
Description
Return Values
Errors
Example
Authors
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

unsigned long PAPI_thread_id(void); 

Fortran Interface

#include fpapi.h 

PAPIF_thread_id(C_INT id) 

DESCRIPTION

None.

RETURN VALUES

On success, this function returns a valid thread identifier.
On error, (unsigned long int)-1 is returned.

ERRORS

None.

EXAMPLE


unsigned long tid;

if (PAPI_library_init(PAPI_VER_CURRENT) != PAPI_VER_CURRENT) exit(1);

if (PAPI_thread_init(pthread_self) != PAPI_OK) exit(1);

if ((tid = PAPI_thread_id()) == (unsigned long int)-1) exit(1);

printf("Initial thread id is: %lu\n",tid);

AUTHORS

The PAPI Team. See them at the PAPI Web Site: http://icl.cs.utk.edu/projects/papi

BUGS

This function has no known bugs.

SEE ALSO

PAPI_thread_init (3)


PAPI Programmer’s Reference PAPI_thread_id (3) November, 2003

  Innovative Computing Laboratory
2001 R&D Winner  
Contact PAPI: papi@cs.utk.edu Computer Science Department
  University of Tennessee