NAME

PAPI_lock - Lock the PAPI internal mutex variable
PAPI_unlock - Unlock the PAPI internal mutex variable

CONTENTS

Synopsis
Description
Return Values
Notes
Author
Bugs
See Also

SYNOPSIS

C Interface

#include <papi.h> 

void PAPI_lock(void); 

void PAPI_unlock(void); 

Fortran Interface

#include fpapi.h 

PAPIF_lock() 

PAPIF_unlock() 

DESCRIPTION

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.

RETURN VALUES

There are no return values for these calls. Upon return from PAPI_lock the current thread has acquired exclusive access to the PAPI mutex.

NOTES

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.

AUTHOR

Philip J. Mucci <mucci@cs.utk.edu>

BUGS

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.

SEE ALSO

The PAPI Web Site: http://icl.cs.utk.edu/projects/papi


PAPI Function Reference PAPI_lock (3) December, 2001

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