plist_for_each_entry_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

okay so bestie, this is the manual page for plist_for_each_entry_safe(9) in the Kernel API Manual 🫢 it's literally here to iterate safely over list of given type, and it's giving β€œyour loop can handle a list entry getting removed” energy πŸ’…


🌸 SYNOPSIS 🌸

the whole call looks like this, no cap:

plist_for_each_entry_safe (pos , n , head , m );

πŸŽ€ ARGUMENTS πŸŽ€

  • pos β€” the type * to use as a loop counter πŸ”
  • n β€” another type *, this one for temporary storage πŸ—‚οΈ
  • head β€” the head for your list πŸ‘‘
  • m β€” the name of the list_head within the struct 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

This one iterates over a list of the given type, and it's the safe version: it's safe against removal of list entry while you're looping. That's the whole vibe, fr fr πŸ’–


πŸ’œ SEE ALSO πŸ’œ

the kernel file is literally ./include/linux/plist.h πŸ“ and you should also go peek at these, bestie:


okay that's the page!! byeee πŸ’… this one comes from ./include/linux and is dated October 2026, and it's all about plist_for_each_entry_safe(9) 🫢✨

πŸ“¦ where this page comes from