Motr  M0
m0_ht_descr Struct Reference

#include <hash.h>

Collaboration diagram for m0_ht_descr:
Collaboration graph

Data Fields

const struct m0_tl_descrhd_tldescr
 
size_t hd_key_offset
 
uint64_t(* hd_hash_func )(const struct m0_htable *htable, const void *key)
 
bool(* hd_key_eq )(const void *key1, const void *key2)
 

Detailed Description

Hash table descriptor. An instance of this type must be defined per hash table type. Multiple instances of m0_htable can share a single descriptor. It keeps track of tlist descriptor, offset to key field and hash function.

Definition at line 197 of file hash.h.

Field Documentation

◆ hd_hash_func

uint64_t(* hd_hash_func) (const struct m0_htable *htable, const void *key)

Hash function. Has to be provided by user.

Definition at line 205 of file hash.h.

◆ hd_key_eq

bool(* hd_key_eq) (const void *key1, const void *key2)

Key comparison routine. Since hash component supports custom made keys, the comparison routine has to be provided by user.

Definition at line 213 of file hash.h.

◆ hd_key_offset

size_t hd_key_offset

Offset to key field in ambient object.

Definition at line 202 of file hash.h.

◆ hd_tldescr

const struct m0_tl_descr* hd_tldescr

tlist descriptor used for m0_hbucket::hb_objects tlist.

Definition at line 199 of file hash.h.


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