zpci_bus_get_next(9)
π 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 π
- Kernel file
./arch/s390/pci/pci_bus.c zpci_bus_release(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms