idr_init_base(9)
π NAME π
idr_init_base β ok so this one initialises an IDR, bestie, that's literally the whole vibe π
β¨ SYNOPSIS β¨
void idr_init_base (struct idr *idr , int base );
π¦ ARGUMENTS π¦
idrβ your IDR handle π«Ά like, the actual thing you're setting up.baseβ the base value for the IDR β this is the starting number, no cap.
πΈ DESCRIPTION πΈ
So this is the β¨variationβ¨ of idr_init β and the one thing that makes it different (main character energy fr fr) is that it creates an IDR which will allocate IDs starting at base π₯
That's it. That's the whole flex. Starting point = base. Iconic, lowkey.
π SEE ALSO π
Kernel file ./include/linux/idr.h π and honestly the whole friend group:
IDR_INIT(9)DEFINE_IDR(9)idr_get_cursor(9)idr_set_cursor(9)idr sync(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)idr_for_each_entry_continue_ul(9)ida_alloc(9)ida_alloc_min(9)ida_alloc_max(9)
ngl if you got here you're already doing great, go read idr_init(9) next if you want the no-base version π§
okay that's the whole page, mwah π β this came from ./include/linux, dated October 2026, and it's the idr_init_base(9) Kernel API Manual entry. slay, go forth and allocate π
π¦ 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