Wed Jan 8 2020 09:50:23

Asterisk developer's documentation


ast_hashtab Struct Reference

#include <hashtab.h>

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_create(), ast_hashtab_dup(), ast_hashtab_lookup_internal(), and ast_hashtab_remove_object_via_lookup_nolock().

unsigned int(* hash)(const void *obj)
int hash_tab_elements
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(), ast_hashtab_insert_immediate_bucket(), and ast_hashtab_resize().

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_create(), ast_hashtab_dup(), and ast_hashtab_resize().

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_create(), ast_hashtab_dup(), and ast_hashtab_insert_immediate_bucket().

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(), and ast_hashtab_resize().

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_destroy(), ast_hashtab_insert_immediate_bucket(), ast_hashtab_remove_object_internal(), ast_hashtab_resize(), ast_hashtab_start_traversal(), and ast_hashtab_start_write_traversal().


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