Home
last modified time | relevance | path

Searched refs:ht (Results 1 – 25 of 31) sorted by relevance

12

/f-stack/app/redis-5.0.5/deps/hiredis/
H A Ddict.c74 dict *ht = malloc(sizeof(*ht)); in dictCreate() local
97 _dictInit(&n, ht->type, ht->privdata); in dictExpand()
106 for (i = 0; i < ht->size && ht->used > 0; i++) { in dictExpand()
130 *ht = n; in dictExpand()
188 h = dictHashKey(ht, key) & ht->sizemask; in dictDelete()
217 for (i = 0; i < ht->size && ht->used > 0; i++) { in _dictClear()
248 h = dictHashKey(ht, key) & ht->sizemask; in dictFind()
261 iter->ht = ht; in dictGetIterator()
300 if (ht->used == ht->size) in _dictExpandIfNeeded()
301 return dictExpand(ht, ht->size*2); in _dictExpandIfNeeded()
[all …]
H A Ddict.h70 dict *ht; member
81 (ht)->type->valDestructor((ht)->privdata, (entry)->val)
84 if ((ht)->type->valDup) \
85 entry->val = (ht)->type->valDup((ht)->privdata, _val_); \
92 (ht)->type->keyDestructor((ht)->privdata, (entry)->key)
95 if ((ht)->type->keyDup) \
96 entry->key = (ht)->type->keyDup((ht)->privdata, _key_); \
103 (ht)->type->keyCompare((ht)->privdata, key1, key2) : \
106 #define dictHashKey(ht, key) (ht)->type->hashFunction(key) argument
110 #define dictSlots(ht) ((ht)->size) argument
[all …]
/f-stack/dpdk/lib/librte_hash/
H A Drte_fbk_hash.h98 return (ht->hash_func(key, ht->init_val) & ht->bucket_mask) << in rte_fbk_hash_get_bucket()
99 ht->bucket_shift; in rte_fbk_hash_get_bucket()
135 if (! ht->t[bucket + i].entry.is_entry) { in rte_fbk_hash_add_key_with_bucket()
137 ht->used_entries++; in rte_fbk_hash_add_key_with_bucket()
141 if (ht->t[bucket + i].entry.key == key) { in rte_fbk_hash_add_key_with_bucket()
142 ht->t[bucket + i].entry.value = value; in rte_fbk_hash_add_key_with_bucket()
205 ht->t[bucket + i].whole_entry = in rte_fbk_hash_delete_key_with_bucket()
209 ht->used_entries--; in rte_fbk_hash_delete_key_with_bucket()
295 memset(ht->t, 0, sizeof(ht->t[0]) * ht->entries); in rte_fbk_hash_clear_all()
296 ht->used_entries = 0; in rte_fbk_hash_clear_all()
[all …]
H A Drte_fbk_hash.c85 sizeof(*ht) + (sizeof(ht->t[0]) * params->entries); in rte_fbk_hash_create()
115 ht = NULL; in rte_fbk_hash_create()
130 if (ht == NULL) { in rte_fbk_hash_create()
145 strlcpy(ht->name, params->name, sizeof(ht->name)); in rte_fbk_hash_create()
146 ht->entries = params->entries; in rte_fbk_hash_create()
148 ht->used_entries = 0; in rte_fbk_hash_create()
164 te->data = (void *) ht; in rte_fbk_hash_create()
171 return ht; in rte_fbk_hash_create()
186 if (ht == NULL) in rte_fbk_hash_free()
196 if (te->data == (void *) ht) in rte_fbk_hash_free()
[all …]
/f-stack/freebsd/netpfil/ipfw/
H A Ddn_heap.c396 if (ht->ht != (void *)(ht + 1)) in dn_ht_init()
397 free(ht->ht, M_DN_HEAP); in dn_ht_init()
410 ht->ht = (void **)(ht + 1); in dn_ht_init()
437 if (ht->ht && ht->ht != (void *)(ht + 1)) in dn_ht_free()
438 free(ht->ht, M_DN_HEAP); in dn_ht_free()
446 return ht ? ht->entries : 0; in dn_ht_entries()
461 for (pp = &ht->ht[i]; (p = *pp); pp = (void **)((char *)p + ht->ofs)) { in dn_ht_find()
482 *(void **)((char *)p + ht->ofs) = ht->ht[i]; in dn_ht_find()
483 ht->ht[i] = p; in dn_ht_find()
502 curp = &ht->ht[i]; in dn_ht_scan()
[all …]
/f-stack/app/redis-5.0.5/src/
H A Ddict.c105 ht->size = 0; in _dictReset()
223 d->ht[0] = d->ht[1]; in dictRehash()
296 dictht *ht; in dictAddRaw() local
309 ht = dictIsRehashing(d) ? &d->ht[1] : &d->ht[0]; in dictAddRaw()
313 ht->used++; in dictAddRaw()
446 for (i = 0; i < ht->size && ht->used > 0; i++) { in _dictClear()
566 dictht *ht = &iter->d->ht[iter->table]; in dictNext() local
578 ht = &iter->d->ht[1]; in dictNext()
625 he = (h >= d->ht[0].size) ? d->ht[1].table[h - d->ht[0].size] : in dictGetRandomKey()
934 if (d->ht[0].used >= d->ht[0].size && in _dictExpandIfNeeded()
[all …]
H A Ddict.h79 dictht ht[2]; member
146 #define dictSlots(d) ((d)->ht[0].size+(d)->ht[1].size)
147 #define dictSize(d) ((d)->ht[0].used+(d)->ht[1].used)
158 dictEntry *dictUnlink(dict *ht, const void *key);
H A Dlazyfree.c36 dict *ht = obj->ptr; in lazyfreeGetFreeEffort() local
37 return dictSize(ht); in lazyfreeGetFreeEffort()
42 dict *ht = obj->ptr; in lazyfreeGetFreeEffort() local
43 return dictSize(ht); in lazyfreeGetFreeEffort()
H A Ddefrag.c146 dictht *ht; in dictIterDefragEntry() local
158 ht = &iter->d->ht[iter->table]; in dictIterDefragEntry()
159 if (ht->table[iter->index] == iter->entry) { in dictIterDefragEntry()
163 ht->table[iter->index] = newde; in dictIterDefragEntry()
177 newtable = activeDefragAlloc(d->ht[0].table); in dictDefragTables()
179 defragged++, d->ht[0].table = newtable; in dictDefragTables()
181 if (d->ht[1].table) { in dictDefragTables()
182 newtable = activeDefragAlloc(d->ht[1].table); in dictDefragTables()
184 defragged++, d->ht[1].table = newtable; in dictDefragTables()
H A Ddb.c631 dict *ht; in scanGenericCommand() local
681 ht = NULL; in scanGenericCommand()
683 ht = c->db->dict; in scanGenericCommand()
685 ht = o->ptr; in scanGenericCommand()
687 ht = o->ptr; in scanGenericCommand()
691 ht = zs->dict; in scanGenericCommand()
695 if (ht) { in scanGenericCommand()
709 cursor = dictScan(ht, cursor, scanCallback, NULL, privdata); in scanGenericCommand()
H A Ddebug.c592 dict *ht = NULL; in debugCommand() local
602 ht = zs->dict; in debugCommand()
606 ht = o->ptr; in debugCommand()
610 if (ht == NULL) { in debugCommand()
615 dictGetStats(buf,sizeof(buf),ht); in debugCommand()
1229 unsigned long ht[256] = {0}; in dumpX86Calls() local
1237 if (ht[target&0xff] != target) { in dumpX86Calls()
1239 ht[target&0xff] = target; in dumpX86Calls()
H A Dt_zset.c1823 } ht; member
1875 it->ht.dict = op->subject->ptr; in zuiInitIterator()
1877 it->ht.de = dictNext(it->ht.di); in zuiInitIterator()
1910 dictReleaseIterator(it->ht.di); in zuiClearIterator()
1936 dict *ht = op->subject->ptr; in zuiLength() local
1937 return dictSize(ht); in zuiLength()
1980 if (it->ht.de == NULL) in zuiNext()
1982 val->ele = dictGetKey(it->ht.de); in zuiNext()
1986 it->ht.de = dictNext(it->ht.di); in zuiNext()
2096 dict *ht = op->subject->ptr; in zuiFind() local
[all …]
/f-stack/dpdk/lib/librte_ring/
H A Drte_ring_peek_c11_mem.h31 __rte_ring_st_get_tail(struct rte_ring_headtail *ht, uint32_t *tail, in __rte_ring_st_get_tail() argument
36 h = ht->head; in __rte_ring_st_get_tail()
37 t = ht->tail; in __rte_ring_st_get_tail()
53 __rte_ring_st_set_head_tail(struct rte_ring_headtail *ht, uint32_t tail, in __rte_ring_st_set_head_tail() argument
61 ht->head = pos; in __rte_ring_st_set_head_tail()
62 __atomic_store_n(&ht->tail, pos, __ATOMIC_RELEASE); in __rte_ring_st_set_head_tail()
75 __rte_ring_hts_get_tail(struct rte_ring_hts_headtail *ht, uint32_t *tail, in __rte_ring_hts_get_tail() argument
81 p.raw = __atomic_load_n(&ht->ht.raw, __ATOMIC_RELAXED); in __rte_ring_hts_get_tail()
97 __rte_ring_hts_set_head_tail(struct rte_ring_hts_headtail *ht, uint32_t tail, in __rte_ring_hts_set_head_tail() argument
107 __atomic_store_n(&ht->ht.raw, p.raw, __ATOMIC_RELEASE); in __rte_ring_hts_set_head_tail()
H A Drte_ring_hts_c11_mem.h25 __rte_ring_hts_update_tail(struct rte_ring_hts_headtail *ht, uint32_t old_tail, in __rte_ring_hts_update_tail() argument
33 __atomic_store_n(&ht->ht.pos.tail, tail, __ATOMIC_RELEASE); in __rte_ring_hts_update_tail()
42 __rte_ring_hts_head_wait(const struct rte_ring_hts_headtail *ht, in __rte_ring_hts_head_wait() argument
47 p->raw = __atomic_load_n(&ht->ht.raw, __ATOMIC_ACQUIRE); in __rte_ring_hts_head_wait()
64 op.raw = __atomic_load_n(&r->hts_prod.ht.raw, __ATOMIC_ACQUIRE); in __rte_ring_hts_move_prod_head()
101 } while (__atomic_compare_exchange_n(&r->hts_prod.ht.raw, in __rte_ring_hts_move_prod_head()
120 op.raw = __atomic_load_n(&r->hts_cons.ht.raw, __ATOMIC_ACQUIRE); in __rte_ring_hts_move_cons_head()
156 } while (__atomic_compare_exchange_n(&r->hts_cons.ht.raw, in __rte_ring_hts_move_cons_head()
H A Drte_ring_rts_c11_mem.h25 __rte_ring_rts_update_tail(struct rte_ring_rts_headtail *ht) in __rte_ring_rts_update_tail() argument
34 ot.raw = __atomic_load_n(&ht->tail.raw, __ATOMIC_ACQUIRE); in __rte_ring_rts_update_tail()
38 h.raw = __atomic_load_n(&ht->head.raw, __ATOMIC_RELAXED); in __rte_ring_rts_update_tail()
44 } while (__atomic_compare_exchange_n(&ht->tail.raw, &ot.raw, nt.raw, in __rte_ring_rts_update_tail()
53 __rte_ring_rts_head_wait(const struct rte_ring_rts_headtail *ht, in __rte_ring_rts_head_wait() argument
58 max = ht->htd_max; in __rte_ring_rts_head_wait()
60 while (h->val.pos - ht->tail.val.pos > max) { in __rte_ring_rts_head_wait()
62 h->raw = __atomic_load_n(&ht->head.raw, __ATOMIC_ACQUIRE); in __rte_ring_rts_head_wait()
H A Drte_ring.c96 struct rte_ring_headtail *ht; in reset_headtail() local
100 ht = p; in reset_headtail()
104 switch (ht->sync_type) { in reset_headtail()
107 ht->head = 0; in reset_headtail()
108 ht->tail = 0; in reset_headtail()
115 ht_hts->ht.raw = 0; in reset_headtail()
198 offsetof(struct rte_ring_hts_headtail, ht.pos.tail)); in rte_ring_init()
H A Drte_ring_generic.h14 update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, in update_tail() argument
26 while (unlikely(ht->tail != old_val)) in update_tail()
29 ht->tail = new_val; in update_tail()
H A Drte_ring_c11_mem.h14 update_tail(struct rte_ring_headtail *ht, uint32_t old_val, uint32_t new_val, in update_tail() argument
24 while (unlikely(ht->tail != old_val)) in update_tail()
27 __atomic_store_n(&ht->tail, new_val, __ATOMIC_RELEASE); in update_tail()
H A Drte_ring_core.h109 volatile union __rte_ring_hts_pos ht; member
/f-stack/app/redis-5.0.5/utils/hashtable/
H A Drehashing.c36 void showBuckets(dictht ht) { in showBuckets() argument
37 if (ht.table == NULL) { in showBuckets()
41 for (j = 0; j < ht.size; j++) { in showBuckets()
42 printf("%c", ht.table[j] ? '1' : '0'); in showBuckets()
57 showBuckets(d->ht[0]); in show()
59 showBuckets(d->ht[1]); in show()
/f-stack/freebsd/contrib/ck/src/
H A Dck_ht.c386 ck_ht_gc(struct ck_ht *ht, unsigned long cycles, unsigned long seed) in ck_ht_gc() argument
389 struct ck_ht_map *map = ht->map; in ck_ht_gc()
406 bounds = ht->m->malloc(size); in ck_ht_gc()
428 if (ht->mode & CK_HT_MODE_BYTESTRING) { in ck_ht_gc()
432 ht->h(&h, ck_ht_entry_key(entry), ck_ht_entry_key_length(entry), in ck_ht_gc()
433 ht->seed); in ck_ht_gc()
443 ht->h(&h, &entry->key, sizeof(entry->key), ht->seed); in ck_ht_gc()
490 ht->m->free(bounds, size, false); in ck_ht_gc()
/f-stack/freebsd/mips/ingenic/
H A Djz4780_lcd.c202 u_int hds, hde, ht, vds, vde, vt; in jzlcd_set_videomode() local
215 ht = hde + hfp; in jzlcd_set_videomode()
223 (ht << LCDVAT_HT_SHIFT) | (vt << LCDVAT_VT_SHIFT)); in jzlcd_set_videomode()
/f-stack/freebsd/contrib/ncsw/Peripherals/FM/Pcd/
H A Dfman_kg.c455 uint8_t offset, shift, ht; in fman_kg_build_scheme() local
548 ht = get_gen_ht_code(gen_params->src, in fman_kg_build_scheme()
551 tmp_reg |= (uint32_t)ht << FMAN_KG_SCH_GEN_HT_SHIFT; in fman_kg_build_scheme()
/f-stack/tools/ifconfig/
H A Difbridge.c245 u_int8_t ht, fd, ma, hc, pro; in bridge_status() local
260 ht = ifbp.ifbop_hellotime; in bridge_status()
267 ether_ntoa((struct ether_addr *)lladdr), pri, ht, fd); in bridge_status()
/f-stack/freebsd/net80211/
H A Dieee80211_ht.c3492 struct ieee80211_ie_htinfo *ht = in ieee80211_ht_update_beacon() local
3499 ht->hi_ctrlchannel = ieee80211_chan2ieee(ic, bsschan); in ieee80211_ht_update_beacon()
3501 ht->hi_byte1 = IEEE80211_HTINFO_RIFSMODE_PERM; in ieee80211_ht_update_beacon()
3503 ht->hi_byte1 = IEEE80211_HTINFO_RIFSMODE_PROH; in ieee80211_ht_update_beacon()
3505 ht->hi_byte1 |= IEEE80211_HTINFO_2NDCHAN_ABOVE; in ieee80211_ht_update_beacon()
3507 ht->hi_byte1 |= IEEE80211_HTINFO_2NDCHAN_BELOW; in ieee80211_ht_update_beacon()
3509 ht->hi_byte1 |= IEEE80211_HTINFO_2NDCHAN_NONE; in ieee80211_ht_update_beacon()
3511 ht->hi_byte1 |= IEEE80211_HTINFO_TXWIDTH_2040; in ieee80211_ht_update_beacon()
3520 ht->hi_byte2 = (ht->hi_byte2 &~ PROTMODE) | ic->ic_curhtprotmode; in ieee80211_ht_update_beacon()

12