PMIUSECONTEXT(3)

πŸ“¦
version 7.2.2 Β· 3 versions
, in arch rolling, centos-stream 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– PMIUSECONTEXT(3) πŸ’–

okay so bestie, welcome to pmiUseContext β€” a lil function from the Library Functions Manual that lets you hop between LOGIMPORT contexts like it's nothing. switching vibes, switching archives, main character energy only πŸ’…


✨ NAME ✨

pmiUseContext β€” change LOGIMPORT context

no cap, that's the whole job. it changes your context. that's it. that's the function. πŸŽ€


🌸 C SYNOPSIS 🌸

#include <pcp/pmapi.h>
#include <pcp/import.h>

int pmiUseContext(int context);

cc ... -lpcp_import -lpcp

πŸ¦‹ Perl SYNOPSIS πŸ¦‹

use PCP::LogImport;

pmiUseContext($context);

✨ DESCRIPTION ✨

So here's the tea πŸ“: as part of the Performance Co-Pilot Log Import API (peep LOGIMPORT(3) for the full lore), pmiUseContext is the one you call when you're an application that wants to generate more than one PCP archive at the same time. concurrently. simultaneously. multitasking icon behavior πŸ‘‘

The context argument is a value returned from a previous call to pmiStart(3) β€” like, you don't just make it up, bestie, it comes from pmiStart(3), okay? And on a successful return from pmiUseContext, the current context will have been changed to the one identified by context. boom. switched. new context, who dis πŸ’…βœ¨


πŸ’€ DIAGNOSTICS πŸ’€

pmiUseContext returns zero on success. slay. πŸŽ‰

Otherwise? it returns a negative value 😭 which you can turn into an actual error message by calling pmiErrStr(3). so like, don't just sit there staring at a negative number, go get the real tea from pmiErrStr(3).


πŸ‘‘ SEE ALSO πŸ‘‘


that's the whole page fr fr 🫢 go forth and switch contexts responsibly, and remember: Performance Co-Pilot made this, it lives at PMIUSECONTEXT(3), and it's giving iconic library-manual energy. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from