Asterisk - The Open Source Telephony Project GIT-master-f36a736
|
#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_bucket * | tlist |
struct ast_hashtab_bucket** array |
Definition at line 85 of file hashtab.h.
Referenced by _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate_bucket(), _ast_hashtab_resize(), ast_hashtab_destroy(), ast_hashtab_lookup_internal(), ast_hashtab_remove_object_internal(), ast_hashtab_remove_object_via_lookup_nolock(), and ast_hashtab_remove_this_object_nolock().
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().
int do_locking |
if 1 use locks to guarantee safety of insertions/deletions
Definition at line 99 of file hashtab.h.
Referenced by _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate(), _ast_hashtab_insert_safe(), _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), ast_hashtab_destroy(), ast_hashtab_end_traversal(), ast_hashtab_get_stats(), ast_hashtab_lookup(), ast_hashtab_lookup_with_hash(), ast_hashtab_remove_object_via_lookup(), and ast_hashtab_remove_this_object().
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_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate(), _ast_hashtab_resize(), 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_insert_immediate_bucket(), ast_hashtab_get_stats(), ast_hashtab_remove_object_internal(), ast_hashtab_resize_java(), ast_hashtab_resize_tight(), and ast_hashtab_size().
int hash_tab_size |
the size of the bucket array
Definition at line 94 of file hashtab.h.
Referenced by _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate(), _ast_hashtab_resize(), ast_hashtab_capacity(), ast_hashtab_destroy(), ast_hashtab_get_stats(), ast_hashtab_lookup(), ast_hashtab_lookup_bucket(), ast_hashtab_lookup_with_hash(), ast_hashtab_newsize_java(), ast_hashtab_newsize_none(), ast_hashtab_newsize_tight(), ast_hashtab_remove_object_via_lookup_nolock(), ast_hashtab_remove_this_object_nolock(), ast_hashtab_resize_java(), and ast_hashtab_resize_tight().
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().
ast_rwlock_t lock |
Definition at line 101 of file hashtab.h.
Referenced by _ast_hashtab_create(), _ast_hashtab_dup(), _ast_hashtab_insert_immediate(), _ast_hashtab_insert_safe(), _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), ast_hashtab_destroy(), ast_hashtab_destroylock(), ast_hashtab_end_traversal(), ast_hashtab_get_stats(), ast_hashtab_initlock(), ast_hashtab_lookup(), ast_hashtab_lookup_with_hash(), ast_hashtab_rdlock(), ast_hashtab_remove_object_via_lookup(), ast_hashtab_remove_this_object(), ast_hashtab_unlock(), and ast_hashtab_wrlock().
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_resize(), and 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_insert_immediate_bucket(), _ast_hashtab_resize(), _ast_hashtab_start_traversal(), _ast_hashtab_start_write_traversal(), ast_hashtab_destroy(), and ast_hashtab_remove_object_internal().