parman_create(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… parman_create(9) β€” like, the whole vibe

okay so bestie, sit down, we're talking about parman_create(9) from the Kernel API Manual ✨ this is the little function that births a brand-new parman instance, and honestly? iconic behavior.


🌸 NAME 🌸

parman_create β€” creates a new parman instance 🫢


✨ SYNOPSIS ✨

struct parman * parman_create (const struct parman_ops *ops , void *priv );

πŸŽ€ ARGUMENTS πŸŽ€

  • ops β€” the caller-specific callbacks. like, your callbacks, bestie, parman isn't gonna make them up for you πŸ’…
  • priv β€” a pointer to private data that gets passed along to the ops. your little bag of secrets πŸ‘œ

πŸ”₯ NOTE πŸ”₯

okay this is the important part so pay attention β€” all locking must be provided by the caller. no cap, parman is not doing that for you, that's a you problem πŸ’€

Each parman instance manages an array area with chunks of entries that all share the same priority. it's giving organized, honestly. consider the following example:

item 1 with prio 10
item 2 with prio 10
item 3 with prio 10
item 4 with prio 20
item 5 with prio 20
item 6 with prio 30
item 7 with prio 30
item 8 with prio 30

so in this example there are 3 priority chunks 🧚 the order of the priorities matters, but the order of items within a single priority chunk does not matter. so the same array could totally be ordered like this instead:

item 2 with prio 10
item 3 with prio 10
item 1 with prio 10
item 5 with prio 20
item 4 with prio 20
item 7 with prio 30
item 8 with prio 30
item 6 with prio 30

see how it's the same? the vibes are preserved 😌✨

The goal of parman is to maintain the priority ordering. the caller provides ops with callbacks that parman uses to move the items and resize the array area. that's the whole deal πŸ¦‹

Returns a pointer to the newly created parman instance in case of success β€” otherwise it returns NULL. so like, check it, bestie πŸ™ˆ

⚠️ heads up: success gives you a pointer, failure gives you NULL. don't go dereferencing the NULL, that's not the vibe.

πŸ‘‘ SEE ALSO πŸ‘‘

Kernel file ./lib/parman.c


and that's the whole page, bestie πŸ’– this lil drop came from ./lib, dated October 2026 β€” catch you in the next manpage, mwah πŸŽ€πŸ«Άβœ¨

πŸ“¦ where this page comes from