rht_for_each_entry_safe(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ NAME ✨

Okay so welcome to the rht_for_each_entry_safe(9) page in the Kernel API Manual, bestie. This one is your safe-iteration bestie for a hash chain of a given type: rht_for_each_entry_safe β€” safely iterate over hash chain of given type. That's literally the whole name, and it ate. πŸ’…


πŸ›  SYNOPSIS πŸ› 

rht_for_each_entry_safe (tpos , pos , next , tbl , hash , member );

πŸŽ€ ARGUMENTS πŸŽ€

  • tpos β€” the type * to use as a loop cursor. Main character cursor energy. ✨
  • pos β€” the struct rhash_head to use as a loop cursor.
  • next β€” the struct rhash_head to use as next in loop cursor.
  • tbl β€” the struct bucket_table. The table in question, no cap. πŸͺ£
  • hash β€” the hash value / bucket index.
  • member β€” name of the struct rhash_head within the hashable struct.

πŸ’– DESCRIPTION πŸ’–

This hash chain list-traversal primitive is the one where the looped code is allowed to remove the loop cursor from the list. That's the safety bit, periodt β€” the code inside your loop can take the current cursor out of the list, and that's the whole point. πŸ¦‹πŸ”₯


πŸ”— SEE ALSO πŸ”—

The whole linked-list-rhashtable squad, go off πŸ‘‘:


xoxo, source/version vibes: ./include/linux; date: October 2026; page: rht_for_each_entry_safe(9) β€” byeee πŸ’…βœ¨

πŸ“¦ where this page comes from