idr_for_each..._continue_ul(9)
π 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 π§
IDR_INIT(9)DEFINE_IDR(9)idr_get_cursor(9)idr_set_cursor(9)idr sync(9)idr_init_base(9)idr_init(9)idr_is_empty(9)idr_preload_end(9)idr_for_each_entry(9)idr_for_each_entry_ul(9)idr_for_each_entry_continue(9)ida_alloc(9)ida_alloc_min(9)ida_alloc_max(9)
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
- 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