rht_for_each_entry_from(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ rht_for_each_entry_from(9) ✨

okay so bestie, welcome to rht_for_each_entry_from β€” it's a kernel macro from the rht_for_each_entry_from(9) corner of the Kernel API Manual and honestly it's giving "walk the hash chain, but start from a specific head" energy. πŸ’…


🌸 NAME 🌸

rht_for_each_entry_from β€” iterate over hash chain from given head πŸ¦‹

like literally, you point at a head and it loops you through the entries from there. no cap.


✨ SYNOPSIS ✨

rht_for_each_entry_from (tpos , pos , head , tbl , hash , member );

yes that's the whole vibe. six args. she's a little wordy but she works. πŸŽ€


πŸ’– ARGUMENTS πŸ’–

  • tpos β€” the type * to use as a loop cursor. that's your main character pointer, the one you actually use inside the loop. 🌟
  • pos β€” the struct rhash_head to use as a loop cursor. the lowkey plumbing cursor, also along for the ride. 🫢
  • head β€” the struct rhash_head to start from. this is the whole point of the macro β€” you begin here, not at the top of the chain. πŸ“
  • tbl β€” the struct bucket_table. your bucket table, iykyk. πŸͺ£
  • hash β€” the hash value / bucket index. which bucket we're poking around in. πŸ”’
  • member β€” name of the struct rhash_head within the hashable struct. like tell her which field is the embedded head so she can do the pointer math. 🧚
ngl, this is a macro, so all the usual "don't do weird stuff inside the loop body" energy applies. 🫣

πŸ¦‹ SEE ALSO πŸ¦‹

the whole friend group shows up here, and we're listing every single one because they all ate:

like, the entire rhashtable extended universe. πŸ‘‘


and that's the page, bestie!! πŸŽ€ one last thing β€” this one comes to you from ./include/linux, dated October 2026, so jot that down in your notes app. mwah. πŸ’œβœ¨πŸ¦‹πŸŒΈ

πŸ“¦ where this page comes from