Motr  M0
hash.h File Reference
#include "lib/types.h"
#include "lib/tlist.h"
#include "lib/mutex.h"
Include dependency graph for hash.h:

Go to the source code of this file.

Data Structures

struct  m0_hbucket
 
struct  m0_htable
 
struct  m0_ht_descr
 
struct  m0_hlink
 

Macros

#define __MOTR_LIB_HASH_H__
 
#define M0_HT_DESCR(name, amb_type, key_field, hash_func, key_eq)
 
#define M0_HT_DESCR_DEFINE(name, htname, scope, amb_type, amb_link_field, amb_magic_field, amb_magic, head_magic, key_field, hash_func, key_eq)
 
#define M0_HT_DESCR_DECLARE(name, scope)   scope const struct m0_ht_descr name ## _ht
 
#define M0_HT_DECLARE(name, scope, amb_type, key_type)
 
#define M0_HT_DEFINE(name, scope, amb_type, key_type)
 
#define m0_hbucket_forall(name, var, bucket, ...)
 
#define m0_htable_forall(name, var, htable, ...)
 
#define m0_htable_for(name, var, htable)
 
#define m0_htable_endfor   m0_tl_endfor; }; })
 
#define m0_hbucket_for(descr, var, bucket)
 
#define m0_hbucket_endfor   m0_tlist_endfor; })
 
#define m0_hbucket_forall_ol(descr, var, bucket, ...)
 

Functions

M0_INTERNAL int m0_htable_init (const struct m0_ht_descr *d, struct m0_htable *htable, uint64_t bucket_nr)
 
M0_INTERNAL bool m0_htable_is_init (const struct m0_htable *htable)
 
M0_INTERNAL void m0_htable_fini (struct m0_htable *htable)
 
M0_INTERNAL void m0_htable_add (struct m0_htable *htable, void *amb)
 
M0_INTERNAL void m0_htable_cc_add (struct m0_htable *htable, void *amb)
 
M0_INTERNAL void m0_htable_del (struct m0_htable *htable, void *amb)
 
M0_INTERNAL void m0_htable_cc_del (struct m0_htable *htable, void *amb)
 
M0_INTERNAL void * m0_htable_lookup (const struct m0_htable *htable, const void *key)
 
M0_INTERNAL void * m0_htable_cc_lookup (struct m0_htable *htable, const void *key)
 
M0_INTERNAL bool m0_htable_is_empty (const struct m0_htable *htable)
 
M0_INTERNAL uint64_t m0_htable_size (const struct m0_htable *htable)
 
M0_INTERNAL void m0_hbucket_lock (struct m0_htable *htable, const void *key)
 
M0_INTERNAL void m0_hbucket_unlock (struct m0_htable *htable, const void *key)
 
M0_INTERNAL uint64_t m0_hash (uint64_t x)
 

Macro Definition Documentation

◆ __MOTR_LIB_HASH_H__

#define __MOTR_LIB_HASH_H__

Definition at line 26 of file hash.h.