Lines Matching refs:key

49  * Search bucket for key and return the cell number if found; SIZE_T_MAX
53 ckh_bucket_search(ckh_t *ckh, size_t bucket, const void *key)
60 if (cell->key != NULL && ckh->keycomp(key, cell->key))
68 * Search table for key and return cell number if found; SIZE_T_MAX otherwise.
71 ckh_isearch(ckh_t *ckh, const void *key)
77 ckh->hash(key, hashes);
81 cell = ckh_bucket_search(ckh, bucket, key);
87 cell = ckh_bucket_search(ckh, bucket, key);
92 ckh_try_bucket_insert(ckh_t *ckh, size_t bucket, const void *key,
107 if (cell->key == NULL) {
108 cell->key = key;
128 const void *key, *data, *tkey, *tdata;
134 key = *argkey;
148 assert(cell->key != NULL);
150 /* Swap cell->{key,data} and {key,data} (evict). */
151 tkey = cell->key; tdata = cell->data;
152 cell->key = key; cell->data = data;
153 key = tkey; data = tdata;
160 ckh->hash(key, hashes);
184 *argkey = key;
190 if (!ckh_try_bucket_insert(ckh, bucket, key, data))
199 const void *key = *argkey;
202 ckh->hash(key, hashes);
206 if (!ckh_try_bucket_insert(ckh, bucket, key, data))
211 if (!ckh_try_bucket_insert(ckh, bucket, key, data))
228 const void *key, *data;
233 if (aTab[i].key != NULL) {
234 key = aTab[i].key;
236 if (ckh_try_insert(ckh, &key, &data)) {
443 ckh_iter(ckh_t *ckh, size_t *tabind, void **key, void **data)
449 if (ckh->tab[i].key != NULL) {
450 if (key != NULL)
451 *key = (void *)ckh->tab[i].key;
463 ckh_insert(tsd_t *tsd, ckh_t *ckh, const void *key, const void *data)
468 assert(ckh_search(ckh, key, NULL, NULL));
474 while (ckh_try_insert(ckh, &key, &data)) {
487 ckh_remove(tsd_t *tsd, ckh_t *ckh, const void *searchkey, void **key,
496 if (key != NULL)
497 *key = (void *)ckh->tab[cell].key;
500 ckh->tab[cell].key = NULL;
519 ckh_search(ckh_t *ckh, const void *searchkey, void **key, void **data)
527 if (key != NULL)
528 *key = (void *)ckh->tab[cell].key;
538 ckh_string_hash(const void *key, size_t r_hash[2])
540 hash(key, strlen((const char *)key), 0x94122f33U, r_hash);
553 ckh_pointer_hash(const void *key, size_t r_hash[2])
561 u.v = key;