Asterisk - The Open Source Telephony Project  21.4.1
Data Fields
ast_hashtab Struct Reference

Data Fields

struct ast_hashtab_bucket ** array
 
int(* compare )(const void *a, const void *b)
 
int do_locking
 
unsigned int(* hash )(const void *obj)
 
int hash_tab_elements
 
int hash_tab_size
 
int largest_bucket_size
 
ast_rwlock_t lock
 
int(* newsize )(struct ast_hashtab *tab)
 
int(* resize )(struct ast_hashtab *tab)
 
int resize_count
 
struct ast_hashtab_buckettlist
 

Detailed Description

Definition at line 83 of file hashtab.h.

Field Documentation

int(* compare) (const void *a, const void *b)

a ptr to func that returns int, and take two void* ptrs, compares them, rets -1 if a < b; rets 0 if a==b; rets 1 if a>b

Definition at line 88 of file hashtab.h.

Referenced by _ast_hashtab_dup(), and ast_hashtab_remove_object_via_lookup_nolock().

int do_locking
unsigned int(* hash) (const void *obj)

a hash func ptr for this table. Given a raw ptr to an obj, it calcs a hash.

Definition at line 92 of file hashtab.h.

Referenced by _ast_hashtab_dup(), ast_hashtab_lookup(), ast_hashtab_lookup_bucket(), ast_hashtab_remove_object_via_lookup_nolock(), and ast_hashtab_remove_this_object_nolock().

int hash_tab_elements

the number of objects currently stored in the table

Definition at line 95 of file hashtab.h.

Referenced by ast_hashtab_get_stats(), ast_hashtab_resize_java(), ast_hashtab_resize_tight(), and ast_hashtab_size().

int hash_tab_size
int largest_bucket_size

a stat on the health of the table

Definition at line 96 of file hashtab.h.

Referenced by ast_hashtab_get_stats().

int(* newsize) (struct ast_hashtab *tab)

a ptr to func that returns int, a new size for hash tab, based on curr_size

Definition at line 90 of file hashtab.h.

Referenced by _ast_hashtab_dup().

int(* resize) (struct ast_hashtab *tab)

a function to decide whether this hashtable should be resized now

Definition at line 91 of file hashtab.h.

Referenced by _ast_hashtab_dup().

int resize_count

a count of the number of times this table has been resized

Definition at line 97 of file hashtab.h.

Referenced by ast_hashtab_get_stats().

struct ast_hashtab_bucket* tlist

the head of a DLList of all the hashbuckets in the table (for traversal).

Definition at line 86 of file hashtab.h.

Referenced by _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), and ast_hashtab_destroy().


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