idr_for_each_entry_ul(9)
π idr_for_each_entry_ul(9) β Kernel API Manual π
πΈ NAME πΈ
idr_for_each_entry_ul β okay so bestie, this one iterates over an IDRβs elements of a given type. Itβs giving βwalk the entries, but typedβ energy, and honestly? Iconic. β¨
β¨ SYNOPSIS β¨
The call itself, literally exactly like this:
idr_for_each_entry_ul (idr , entry , tmp , id );
π ARGUMENTS π
idrβ the IDR handle. Thatβs the main-character object youβre working with, no cap. πentryβ thetype *to use as cursor. Yep, thatβs your little pointer bestie moving through the loop. π¦tmpβ a temporary placeholder for ID. Itβs just holding space, periodt. πidβ the entry ID. The actual ID, fr fr. β
π DESCRIPTION π
So hereβs the tea: entry and id do not need to be initialized before the loop. Not me expecting you to pre-game them β you literally donβt have to. π
And after the loop terminates normally, entry is left with the value NULL. That is highkey convenient for a "not found" value β like if you need a βnope, nothing hereβ result, itβs already serving that. π
π¦ SEE ALSO π¦
Kernel file: ./include/linux/idr.h
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_continue(9)idr_for_each_entry_continue_ul(9)ida_alloc(9)ida_alloc_min(9)ida_alloc_max(9)
Okurrr, thatβs the page! Cute sign-off time: this one comes from ./include/linux, with a date stamp of October 2026, for idr_for_each_entry_ul(9). Catch you in the next man page, bestie π«Άπβ¨
π¦ 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