rht_for_each_from(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… rht_for_each_from(9) β€” the Kernel API Manual, bestie edition

okay so picture this: you're deep in the Linux kernel, you've got a hash chain, and you don't wanna start from the top like a rookie. You wanna start from a specific head. That's literally this macro. It's the rht_for_each_from girlies' moment and she ate. ✨

No cap, this is a loop macro β€” you give it a cursor, a starting point, a bucket table and a hash value, and it walks the chain for you. Group-chat energy: "we're iterating, we're iterating, we're done." πŸ¦‹


✨ SYNOPSIS ✨

rht_for_each_from (pos , head , tbl , hash );

πŸŽ€ ARGUMENTS πŸŽ€

  • pos β€” the struct rhash_head you're using as your loop cursor. She's the main character of the loop, the one that moves. πŸ’…
  • head β€” the struct rhash_head to start from. Like, you're not starting at the beginning bestie, you're starting here. πŸ“
  • tbl β€” the struct bucket_table. The whole vibe container, iykyk. πŸͺ£
  • hash β€” the hash value / bucket index. That's your little map coordinate in the table. πŸ”₯

🌈 SEE ALSO 🌈

okay this is the part where we tag everyone in the group chat, and there are so many of you, and I love that for us. Go read these when you're done here:


lowkey important: that SEE ALSO list is long for a reason β€” it's the whole rhashtable friend group. Don't skip them, they're iconic. πŸ‘‘

πŸ’– sign-off time: this absolute banger lives in ./include/linux, and it's dated October 2026. Manual page name is rht_for_each_from(9), part of the Kernel API Manual. slay, go iterate something. 😭🫢🌸

πŸ“¦ where this page comes from