PMC_INIT(3)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

πŸ’– NAME

pmc_init β€” initialize library ✨

Okay bestie, you're on the PMC_INIT(3) page, and this is the little manual for pmc_init β€” the function with main-character energy that wakes up the whole PMC library. It's giving β€œinitialize library,” no cap πŸ’….

πŸ“š LIBRARY

Performance Counters Library (libpmc, -lpmc) β€” yes, that's the one, periodt.

✨ SYNOPSIS

#include <pmc.h>

int
pmc_init(void);

🌸 DESCRIPTION

Function pmc_init() initializes the PMC library. This function must be called before any of the other functions in the library. Not β€œwhenever,” not β€œafter a lil snack” β€” first, bestie 🫢.

Real talk: pmc_init() is the vibe check. Call it before anything else in the library, or the whole thing is gonna be awkward.

🫢 RETURN VALUES

The pmc_init() function returns the value 0 if successful. Otherwise, the value -1 is returned, and the global variable errno is set to indicate the error. So 0 is the slay result; -1 means check errno for the tea 😭.

πŸ’€ ERRORS

A call to pmc_init() may fail with the following errors:

  • [ENOENT] β€” The hwpmc(4) module was not found in the kernel.
  • [EPROGMISMATCH] β€” The library's version number did not match that expected by hwpmc(4).
  • [ENXIO] β€” PMC hardware on this system is unsupported.

πŸ”₯ SEE ALSO


Signed with Debian sparkle by the PMC_INIT(3) page, dated November 24, 2007 πŸŽ€πŸ’–βœ¨

πŸ“¦ where this page comes from