Lines Matching defs:hashtab
423 static void mptsas_hash_init(mptsas_hash_table_t *hashtab);
424 static void mptsas_hash_uninit(mptsas_hash_table_t *hashtab, size_t datalen);
425 static void mptsas_hash_add(mptsas_hash_table_t *hashtab, void *data);
426 static void * mptsas_hash_rem(mptsas_hash_table_t *hashtab, uint64_t key1,
428 static void * mptsas_hash_search(mptsas_hash_table_t *hashtab, uint64_t key1,
430 static void * mptsas_hash_traverse(mptsas_hash_table_t *hashtab, int pos);
434 static mptsas_smp_t *mptsas_smp_alloc(mptsas_hash_table_t *hashtab,
436 static void mptsas_smp_free(mptsas_hash_table_t *hashtab, uint64_t wwid,
13952 mptsas_invalid_hashtab(mptsas_hash_table_t *hashtab)
13955 data = mptsas_hash_traverse(hashtab, MPTSAS_HASH_FIRST);
13963 data = mptsas_hash_traverse(hashtab, MPTSAS_HASH_NEXT);
15770 mptsas_search_by_devhdl(mptsas_hash_table_t *hashtab, uint16_t devhdl)
15774 data = mptsas_hash_traverse(hashtab, MPTSAS_HASH_FIRST);
15779 data = mptsas_hash_traverse(hashtab, MPTSAS_HASH_NEXT);
15785 mptsas_tgt_alloc(mptsas_hash_table_t *hashtab, uint16_t devhdl, uint64_t wwid,
15790 tmp_tgt = mptsas_hash_search(hashtab, wwid, phymask);
15815 mptsas_hash_add(hashtab, tmp_tgt);
15821 mptsas_tgt_free(mptsas_hash_table_t *hashtab, uint64_t wwid,
15825 tmp_tgt = mptsas_hash_rem(hashtab, wwid, phymask);
15838 mptsas_smp_alloc(mptsas_hash_table_t *hashtab, mptsas_smp_t *data)
15844 ret_data = mptsas_hash_search(hashtab, key1, key2);
15852 mptsas_hash_add(hashtab, ret_data);
15857 mptsas_smp_free(mptsas_hash_table_t *hashtab, uint64_t wwid,
15861 tmp_smp = mptsas_hash_rem(hashtab, wwid, phymask);
15874 mptsas_hash_init(mptsas_hash_table_t *hashtab)
15876 if (hashtab == NULL) {
15879 bzero(hashtab->head, sizeof (mptsas_hash_node_t) *
15881 hashtab->cur = NULL;
15882 hashtab->line = 0;
15886 mptsas_hash_uninit(mptsas_hash_table_t *hashtab, size_t datalen)
15891 if (hashtab == NULL) {
15895 cur = hashtab->head[line];
15910 mptsas_hash_add(mptsas_hash_table_t *hashtab, void *data)
15917 if (hashtab == NULL) {
15920 ASSERT(mptsas_hash_search(hashtab, key1, key2) == NULL);
15924 head = &(hashtab->head[key1 % MPTSAS_HASH_ARRAY_SIZE]);
15934 mptsas_hash_rem(mptsas_hash_table_t *hashtab, uint64_t key1,
15940 if (hashtab == NULL) {
15943 head = &(hashtab->head[key1 % MPTSAS_HASH_ARRAY_SIZE]);
15964 mptsas_hash_search(mptsas_hash_table_t *hashtab, uint64_t key1,
15969 if (hashtab == NULL) {
15972 cur = hashtab->head[key1 % MPTSAS_HASH_ARRAY_SIZE];
15985 mptsas_hash_traverse(mptsas_hash_table_t *hashtab, int pos)
15989 if (hashtab == NULL) {
15994 hashtab->line = 0;
15995 hashtab->cur = NULL;
15996 this = hashtab->head[0];
15998 if (hashtab->cur == NULL) {
16001 this = hashtab->cur->next;
16006 hashtab->line++;
16007 if (hashtab->line >= MPTSAS_HASH_ARRAY_SIZE) {
16009 hashtab->cur = NULL;
16012 this = hashtab->head[hashtab->line];
16015 hashtab->cur = this;