idr_for_each_entry_ul(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌟 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 β€” the type * 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


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