/kernel/trunk/generic/src/adt/hash_table.c |
---|
47,6 → 47,8 |
*/ |
void hash_table_create(hash_table_t *h, count_t m, count_t max_keys, hash_table_operations_t *op) |
{ |
int i; |
ASSERT(h); |
ASSERT(op && op->hash && op->compare); |
ASSERT(max_keys > 0); |
57,6 → 59,9 |
} |
memsetb((__address) h->entry, m * sizeof(link_t *), 0); |
for (i = 0; i < m; i++) |
list_initialize(&h->entry[i]); |
h->entries = m; |
h->max_keys = max_keys; |
h->op = op; |