PAPI_lock(3)

πŸ’– NAME πŸ’–

PAPI_lock β€” Lock one of two mutex variables defined in papi.h. Bestie, this is the PAPI_lock(3) page from the PAPI manual, and it's here to hand you a clean little lock moment πŸ”’βœ¨


✨ SYNOPSIS ✨

Okay so this is PAPI_lock(3), and the whole vibe is: grab one of the PAPI mutexes with a platform independent call. No cap, that's the headline πŸŽ€

🌸 Detailed Description 🌸

PAPI_lock() grabs access to one of the two PAPI mutex variables. This function is provided to the user to have a platform independent call to a (hopefully) efficiently implemented mutex. It's giving "portable lock energy" fr fr πŸ’…

πŸŽ€ C Interface πŸŽ€

C Interface:

#include <papi.h>
void PAPI_lock(int lock);

πŸ¦‹ Parameters πŸ¦‹

  • lock β€” an integer value specifying one of the two user locks: PAPI_USR1_LOCK or PAPI_USR2_LOCK πŸ”₯

🌈 Returns 🌈

There is no return value for this call. Upon return from PAPI_lock the current thread has acquired exclusive access to the specified PAPI mutex. That's the whole serve: you come back holding the exclusive access, periodt πŸ’«


πŸ‘‘ See also πŸ‘‘

  • PAPI_unlock
  • PAPI_thread_init

πŸ’œ Author πŸ’œ

Generated automatically by Doxygen for PAPI from the source code. The author line is literally iconic in its automation era πŸ€–βœ¨


Ciao bestie πŸ’… β€” this page is from PAPI version 7.2.0.0, dated Wed Jun 25 2025 19:30:48 🫢🌈