ida_find_first_range(9)
π ida_find_first_range(9) π
ok so this is a page from the Kernel API Manual bestie, and it's all about ida_find_first_range β the little function that goes "hey, what's the lowest ID somebody's actually using in here?" π
β¨ NAME β¨
ida_find_first_range β get the lowest used ID. literally that's the whole job, and she does it slayfully π
β¨ SYNOPSIS β¨
int ida_find_first_range (struct ida *ida , unsigned int min , unsigned
int max );
π¦ ARGUMENTS π¦
idaβ your IDA handle π this is the lil container we're snooping around in.minβ the lowest ID you want to get. the floor of the search, basically.maxβ the highest ID you want to get. the ceiling. the vibes boundary. β
πΈ DESCRIPTION πΈ
ok so real talk: this gets the lowest used ID between min and max, and yes bestie, that range is inclusive on both ends π―
and here's the tea β the returned ID will not exceed INT_MAX, even if max is larger. like, max can be out here living its best enormous life and the return value is still gonna respect that INT_MAX ceiling. no cap. π
π CONTEXT π
any context. takes and releases the xa_lock. so she's polite about it β grabs the lock, does her thing, puts it right back π«Ά
β RETURN β
the lowest used ID. and if there's no used ID to be found? you get an errno instead π that's it, that's the deal.
π SEE ALSO π
kernel file ./lib/idr.c, plus the whole friend group:
idr_alloc_u32(9)idr_alloc(9)idr_alloc_cyclic(9)idr_remove(9)idr_find(9)idr_for_each(9)idr_get_next_ul(9)idr_get_next(9)idr_replace(9)IDA description(9)ida_alloc_range(9)ida_free(9)ida_destroy(9)
and that's the whole page bestie!! π§ this icon lives in ./lib, it's dated October 2026, and it's literally called ida_find_first_range(9) β go find some ranges, you got this ππβ¨
π¦ 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