Asterisk - The Open Source Telephony Project GIT-master-7e7a603
Data Fields
ast_hashtab Struct Reference

#include <hashtab.h>

Collaboration diagram for ast_hashtab:
Collaboration graph
[legend]

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

◆ array

struct ast_hashtab_bucket** array

◆ compare

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().

◆ do_locking

int do_locking

◆ hash

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

◆ hash_tab_elements

int hash_tab_elements

◆ hash_tab_size

int hash_tab_size

◆ largest_bucket_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_insert_immediate_bucket(), _ast_hashtab_resize(), and ast_hashtab_get_stats().

◆ lock

◆ newsize

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().

◆ 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().

◆ resize_count

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

◆ tlist

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_insert_immediate_bucket(), _ast_hashtab_resize(), _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), ast_hashtab_destroy(), and ast_hashtab_remove_object_internal().


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