PAPI_lock() Grabs access to the PAPI mutex variable. This function is provided to the
user to have a platform independent call to an (hopefully) efficiently
implemented mutex.
PAPI_unlock() unlocks the mutex acquired by a call to
PAPI_lock.
Care must be taken since the mutex variable used is the internal PAPI
mutex variable. The thread that has acquired the mutex should be
designed so as not to call any PAPI library functions until a call to
PAPI_unlock has been made. Also, other threads that call PAPI library functions may
be blocked until the thread that has grabbed the mutex has released it.
Due to its possible interference with internal PAPI and that there is only
one mutex available through this interface some care must be observed by
the programmer using these calls.