idr_set_cursor(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… NAME πŸ’…

idr_set_cursor β€” set the current position of the cyclic allocator, periodt. ✨

okay bestie, welcome to idr_set_cursor(9) from the Kernel API Manual. this is the little function that sets where the cyclic allocator’s cursor is currently pointing, and it’s giving β€œtiny but important” energy. πŸ’…

πŸŽ€ SYNOPSIS πŸŽ€

void idr_set_cursor (struct idr *idr , unsigned int val );

🌸 ARGUMENTS 🌸

  • idr β€” the idr handle, aka the main character you’re moving the cursor inside. πŸ’–
  • val β€” the new position. the exact spot you want the cursor to be at, no cap. ✨

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so here’s the vibe: the next call to idr_alloc_cyclic will return val if it’s free. if it’s not free, the search will start from this position instead. that’s literally the whole tea. πŸ’…

so yeah β€” val is your β€œplease start here” request, and the allocator either returns it if it’s free or starts searching from that spot. 🫢

πŸ”₯ SEE ALSO πŸ”₯

Kernel file: ./include/linux/idr.h β€” here’s the whole squad of related pages, bestie:


xoxo, your local kernel bestie πŸ’– β€” source/version: ./include/linux Β· date: October 2026 Β· page: idr_set_cursor(9) πŸŽ€

πŸ“¦ where this page comes from