klist_prev(9)
π NAME π
klist_prev(9) β fresh from the Kernel API Manual β is the function that's here to Ante up prev node in list. That's the whole name-drop, bestie. β¨
β¨ SYNOPSIS β¨
struct klist_node * klist_prev (struct klist_iter *i );
π ARGUMENTS π
iβ the iterator structure. She's the main character you pass in, okay? π
π¦ DESCRIPTION π¦
Okay so here's the literal sequence, no cap:
- First, grab the list lock. π
- Decrement the reference count of the previous node, if there was one.
- Grab the prev node, increment its reference count, drop the lock, and return that prev node. π«Ά
That's the whole flow β lock first, handle that previous node's refcount if it exists, then scoop up the prev node, bump its refcount, release the lock, and hand it back. Iconic. πΈ
π SEE ALSO π
Kernel file: ./lib/klist.c
klist_init(9)klist_add_head(9)klist_add_tail(9)klist_add_behind(9)klist_add_before(9)klist_del(9)klist_remove(9)klist_node_attached(9)klist_iter_init_node(9)klist_iter_init(9)klist_iter_exit(9)klist_next(9)
And that's the page, bestie: source/version is ./lib, dated October 2026, and the star of the show is klist_prev(9). Bye~ πππ¦
π¦ 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