lruhash_entry Struct Reference

An entry into the hash table. More...

#include <lruhash.h>

Data Fields

lock_rw_type lock
 rwlock for access to the contents of the entry Note that it does not cover the lru_ and overflow_ ptrs. More...
 
struct lruhash_entryoverflow_next
 next entry in overflow chain. More...
 
struct lruhash_entrylru_next
 next entry in lru chain. More...
 
struct lruhash_entrylru_prev
 prev entry in lru chain. More...
 
hashvalue_type hash
 hash value of the key. More...
 
void * key
 key
 
void * data
 data
 

Detailed Description

An entry into the hash table.

To change overflow_next you need to hold the bin lock. To change the lru items you need to hold the hashtable lock. This structure is designed as part of key struct. And key pointer helps to get the surrounding structure. Data should be allocated on its own.

Field Documentation

◆ lock

◆ overflow_next

◆ lru_next

struct lruhash_entry* lruhash_entry::lru_next

next entry in lru chain.

covered by hashlock.

Referenced by check_lru_table(), check_table(), dump_msg_lruhash(), dump_rrset_lruhash(), lru_demote(), and reclaim_space().

◆ lru_prev

struct lruhash_entry* lruhash_entry::lru_prev

prev entry in lru chain.

covered by hashlock.

Referenced by check_lru_table(), check_table(), lru_front(), and reclaim_space().

◆ hash


The documentation for this struct was generated from the following file: