zpci_bus_get_next(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… zpci_bus_get_next(9) πŸ’…

okay bestie, welcome to the Kernel API Manual β€” yes that's the manual name, we're fancy here β€” and today's main character is zpci_bus_get_next, which is literally the glow-up function that walks you to the next zbus object from wherever you're currently at in the list. πŸ¦‹


✨ NAME ✨

zpci_bus_get_next β€” get the next zbus object from given position in the list. that's it, that's the vibe. πŸŽ€


🌸 SYNOPSIS 🌸

void zpci_bus_get_next (struct zpci_bus **pos );

🎯 ARGUMENTS 🎯

  • pos β€” your current position/cursor in the global zbus list. think of it as your little finger on the page, except the page is a global list and your finger is a pointer-to-pointer. iykyk. πŸ’…

πŸ”₯ DESCRIPTION πŸ”₯

so here's the tea: it acquires and releases references as the cursor iterates β€” and yes, it might also free/release the cursor itself, so don't get attached. 😭 it is tolerant of concurrent operations on the list, which is honestly such a slay, very unbothered, very secure. ✨

to begin the iteration, set *pos to NULL before calling the function. that's the starting pose. the opening number. the first step of the choreo. 🧚

and *pos is set to NULL in cases where either the list is empty, or *pos is the last element in the list. so when you hit NULL, that's not a bug, that's the end credits rolling. πŸ‘‘


πŸ’œ CONTEXT πŸ’œ

Process context. May sleep. 😴 so pls don't call it from somewhere where sleeping is a whole crime, okay? it's a napper. let it nap. πŸ™ˆ


🌈 SEE ALSO 🌈


ngl, the whole thing lives under ./arch/s390/pci and the page is stamped October 2026 β€” so like, shoutout to the s390 PCI girlies, this one's for you. periodt. πŸ’–πŸŽ€πŸ«Ά
πŸ“¦ where this page comes from