idr_for_each..._continue_ul(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… idr_for_each_entry_continue_ul β€” the kernel API manual, but make it make sense

okay so bestie, we're looking at idr_for_each..._continue_ul(9) from the Kernel API Manual (yes the manpage name literally has ellipsis in it, that's just how it's filed, don't @ me) and honestly? it's a little gem. it's the "keep going where you left off" iterator for IDR elements of a given type. let's get into it πŸŽ€


✨ NAME ✨

idr_for_each_entry_continue_ul β€” Continue iteration over an IDR's elements of a given type. that's it. that's the whole vibe. it continues. it iterates. it does NOT start over, and that's the whole point πŸ’…


🌸 SYNOPSIS 🌸

idr_for_each_entry_continue_ul (idr , entry , tmp , id );

yes the spaces before the commas are real, that's just how the header writes it, leave it alone 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • idr β€” IDR handle. this is your main character, the actual IDR you're walking through ✨
  • entry β€” The type * to use as a cursor. it's a pointer of whatever type you want, and it's literally your little finger on the page going "we were here" πŸ‘‘
  • tmp β€” A temporary placeholder for ID. a lil scratch spot, don't get attached, it's just holding an ID for a sec πŸ™ˆ
  • id β€” Entry ID. the ID of the entry, bestie, it's right there in the name πŸ’€

πŸ’– DESCRIPTION πŸ’–

Continue to iterate over entries, continuing after the current position. that's the whole serve β€” it picks up after where you currently are instead of restarting from the top like some kind of rookie 😭

and here's the iconic part: after normal termination entry is left with the value NULL. which is genuinely so convenient for a "not found" value β€” like the loop itself tells you "nope, nothing here" and you don't have to do any extra checking. ate. πŸ’…βœ¨


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/idr.h β€” go read the source, it's giving documentation but make it code 🧚

the whole IDR/IDA friend group fr fr, go say hi 🌈


okay and before you close the tab β€” big sign-off energy: this page lives in ./include/linux, it's dated October 2026, and it answers to the name idr_for_each..._continue_ul(9). mwah, go iterate responsibly, ily πŸ’œπŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from