PAPI_list_threads(3)

πŸ’– NAME πŸ’–

Okay so this is the PAPI_list_threads(3) page from the PAPI manual, bestie β€” and it does exactly what it says on the label: it gives you the registered thread ids. Slay. ✨

🌸 SYNOPSIS 🌸

Detailed Description

PAPI_list_threads() returns to the caller a list of all thread IDs known to PAPI. Like, the whole roster. πŸ’…

This call assumes an initialized PAPI library. No initialization? No vibe check pass. 🫢

C Interface

#include <papi.h>
int PAPI_list_threads(PAPI_thread_id_t *tids, int * number );

πŸŽ€ Parameters πŸŽ€

  • *tids β€” a pointer to a preallocated array. It may be NULL to only return a count of threads. No more than *number codes will be stored in the array. So yes, you can pass NULL and just get the count β€” iconic low-effort behavior. 😌
  • *number β€” an input and output parameter. Input specifies the number of allocated elements in *tids (if non-NULL), and output specifies the number of threads. It’s giving β€œmultitasking parameter” energy. πŸ¦‹

⭐ Return values ⭐

  • PAPI_OK β€” the call returned successfully. We love a clean win. πŸ’–
  • PAPI_EINVAL β€” *number has an improper value. Not the vibe. πŸ’€

πŸ”₯ See also πŸ”₯

  • PAPI_get_thr_specific
  • PAPI_set_thr_specific
  • PAPI_register_thread
  • PAPI_unregister_thread
  • PAPI_thread_init, PAPI_thread_id

These are the besties in the thread-management group chat, iykyk. πŸ’œ

🌈 Author 🌈

Generated automatically by Doxygen for PAPI from the source code.


Bestie, that’s the whole page! It’s from PAPI version 7.2.0.0, dated Wed Jun 25 2025 19:30:48 β€” periodt. πŸŽ€πŸ’…βœ¨