PAPI_thread_init - Online Linux Manual PageSection : 3
Updated : September, 2004
Source : PAPI Programmer's Reference
Note : PAPI
NAMEPAPI_thread_init − initialize thread support in the PAPI library
SYNOPSISC Interface #include """papi.h"""
int PAPI_thread_init (unsigned long int (*handle)());Fortran Interface #include """fpapi.h"""
PAPIF_thread_init(C_INT FUNCTION handle, C_INT check)
DESCRIPTIONPAPI_thread_init" initializes thread support in the PAPI library. Applications that make no use of threads do not need to call this routine. This function MUST return a UNIQUE thread ID for every new thread/LWP created. The OpenMP call omp_get_thread_num( ) violates this rule, as the underlying LWPs may have been killed off by the run-time system or by a call to omp_set_num_threads( ). In that case, it may still possible to use omp_get_thread_num() in conjunction with PAPI_unregister_thread() when the OpenMP thread has finished. However it is much better to use the underlying thread subsystem's call, which is pthread_self() on Linux platforms.
ARGUMENTShandle" -- Pointer to a function that returns current thread ID.
RETURN VALUESPAPI_OK" The call returned successfully. PAPI_EINVAL" One or more of the arguments is invalid.
EXAMPLESif (PAPI_thread_init(pthread_self) != PAPI_OK)
exit(1);
BUGSThis function has no known bugs.
SEE ALSOPAPI_thread_id(3), PAPI_list_threads (3)," PAPI_get_thr_specific(3), PAPI_set_thr_specific (3)," PAPI_register_thread(3), PAPI_unregister_thread (3), PAPI (3)" 0
Johanes Gumabo
Data Size : 7,062 byte
man-PAPI_thread_init.3Build : 2024-12-29, 07:25 :
Visitor Screen : x
Visitor Counter ( page / site ) : 8 / 256,095
Visitor ID : :
Visitor IP : 3.145.109.231 :
Visitor Provider : AMAZON-02 :
Provider Position ( lat x lon ) : 39.962500 x -83.006100 : x
Provider Accuracy Radius ( km ) : 1000 :
Provider City : Columbus :
Provider Province : Ohio , : ,
Provider Country : United States :
Provider Continent : North America :
Visitor Recorder : Version :
Visitor Recorder : Library :
Online Linux Manual Page : Version : Online Linux Manual Page - Fedora.40 - march=x86-64 - mtune=generic - 24.12.29
Online Linux Manual Page : Library : lib_c - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Online Linux Manual Page : Library : lib_m - 24.10.03 - march=x86-64 - mtune=generic - Fedora.40
Data Base : Version : Online Linux Manual Page Database - 24.04.13 - march=x86-64 - mtune=generic - fedora-38
Data Base : Library : lib_c - 23.02.07 - march=x86-64 - mtune=generic - fedora.36
Very long time ago, I have the best tutor, Wenzel Svojanovsky . If someone knows the email address of Wenzel Svojanovsky , please send an email to johanes_gumabo@yahoo.co.id .
If error, please print screen and send to johanes_gumabo@yahoo.co.id
Under development. Support me via PayPal.