idr_get_cursor(9)
π idr_get_cursor(9) π
okay so bestie, this page is straight outta the Kernel API Manual πβ¨ and it's all about peeking at where the cyclic allocator is currently pointing. iconic little cursor check, no cap π
π NAME π
idr_get_cursor β Return the current position of the cyclic allocator π
β¨ SYNOPSIS β¨
unsigned int idr_get_cursor (const struct idr *idr );
π ARGUMENTS π
idrβ idr handle π«Ά
π¦ DESCRIPTION π¦
The value returned is the value that will be next returned from idr_alloc_cyclic if it is free β otherwise the search will start from this position. π«
Like, that's the whole vibe: you ask the cursor where it's at, and it tells you the next spot idr_alloc_cyclic would hand out if that spot is free. If it's not free, the search just starts from this position instead. simple as that πΈ
π SEE ALSO π
- Kernel file
./include/linux/idr.hπ IDR_INIT(9)DEFINE_IDR(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)idr_for_each_entry_continue_ul(9)ida_alloc(9)ida_alloc_min(9)ida_alloc_max(9)
mwah π bestie, that's the whole page β source/version: ./include/linux, date: October 2026, and the page is idr_get_cursor(9). go forth and cursor-check responsibly ππ
π¦ 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