/illumos-gate/usr/src/lib/libpool/common/ |
H A D | dict.c | 294 dict_bucket_t *bucket; in dict_get() local 297 for (bucket = hdl->dh_buckets[i]; bucket != NULL; in dict_get() 298 bucket = bucket->db_next) in dict_get() 299 if ((*hdl->dh_cmp)(key, bucket->db_key) == 0) in dict_get() 301 return (bucket ? bucket->db_value : NULL); in dict_get() 312 dict_bucket_t *bucket; in dict_put() local 316 for (bucket = hdl->dh_buckets[i]; bucket != NULL; in dict_put() 317 bucket = bucket->db_next) in dict_put() 318 if ((*hdl->dh_cmp)(key, bucket->db_key) == 0) in dict_put() 320 if (bucket) { in dict_put() [all …]
|
/illumos-gate/usr/src/lib/libtecla/common/ |
H A D | hash.c | 85 HashBucket *bucket; /* An array of 'size' hash buckets */ member 94 static HashNode *_find_HashNode(HashTable *hash, HashBucket *bucket, 251 hash->bucket = NULL; in _new_HashTable() 258 hash->bucket = (HashBucket *) malloc(sizeof(HashBucket) * size); in _new_HashTable() 259 if(!hash->bucket) { in _new_HashTable() 267 HashBucket *b = hash->bucket + i; in _new_HashTable() 291 if(hash->bucket) { in _del_HashTable() 293 free(hash->bucket); in _del_HashTable() 294 hash->bucket = NULL; in _del_HashTable() 341 HashBucket *bucket; /* The hash-bucket associated with the name */ in _new_HashSymbol() local [all …]
|
/illumos-gate/usr/src/lib/libbsdmalloc/common/ |
H A D | malloc.bsd43.c | 99 int bucket; in malloc() local 128 bucket = 0; in malloc() 132 bucket++; in malloc() 134 pagebucket = bucket; in malloc() 143 bucket = 0; in malloc() 147 bucket = pagebucket; in malloc() 153 bucket++; in malloc() 159 if ((op = nextf[bucket]) == NULL) { in malloc() 160 morecore(bucket); in malloc() 161 if ((op = nextf[bucket]) == NULL) in malloc() [all …]
|
/illumos-gate/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/ |
H A D | LogLinearDistribution.java | 126 int order, bucket = 0; in fillRangeCache() local 141 rangeCache[bucket][0] = Long.MIN_VALUE; in fillRangeCache() 142 rangeCache[bucket][1] = value - 1; in fillRangeCache() 143 bucket++; in fillRangeCache() 149 rangeCache[bucket][0] = value; in fillRangeCache() 150 rangeCache[bucket][1] = value + step - 1; in fillRangeCache() 151 bucket++; in fillRangeCache() 161 rangeCache[bucket][0] = value; in fillRangeCache() 162 rangeCache[bucket][1] = Long.MAX_VALUE; in fillRangeCache() 186 for (Distribution.Bucket bucket : buckets) in getValue() [all …]
|
H A D | Distribution.java | 114 Bucket bucket; in initialize() local 117 bucket = buckets.get(i); in initialize() 118 frequency = bucket.getFrequency(); in initialize() 121 checkBucketRange(i, len, bucket); in initialize() 164 Bucket bucket; in createBuckets() local 174 bucket = new Distribution.Bucket(min, max, frequencies[i]); in createBuckets() 175 buckets.add(bucket); in createBuckets() 192 checkBucketRange(int i, int bucketCount, Distribution.Bucket bucket, in checkBucketRange() argument 196 checkBucketRange(i, bucket, range); in checkBucketRange() 200 checkBucketRange(int i, int bucketCount, Distribution.Bucket bucket) in checkBucketRange() argument [all …]
|
H A D | LinearDistribution.java | 192 Distribution.Bucket bucket; in getValue() local 195 bucket = buckets.get(0); in getValue() 196 total = (double)bucket.getFrequency() * (double)(getBase() - 1); in getValue() 199 bucket = buckets.get(i); in getValue() 200 total += (double)bucket.getFrequency() * (double)bucket.getMin(); in getValue() 203 bucket = buckets.get(len - 1); in getValue() 207 total += (double)bucket.getFrequency() * in getValue() 208 (double)(bucket.getMin() + 1); in getValue()
|
/illumos-gate/usr/src/uts/common/dtrace/ |
H A D | fasttrap.c | 277 fasttrap_bucket_t *bucket; in fasttrap_pid_cleanup_cb() local 299 bucket = &fasttrap_provs.fth_table[i]; in fasttrap_pid_cleanup_cb() 300 mutex_enter(&bucket->ftb_mtx); in fasttrap_pid_cleanup_cb() 301 fpp = (fasttrap_provider_t **)&bucket->ftb_data; in fasttrap_pid_cleanup_cb() 355 mutex_exit(&bucket->ftb_mtx); in fasttrap_pid_cleanup_cb() 442 fasttrap_bucket_t *bucket = &fasttrap_tpoints.fth_table[i]; in fasttrap_fork() local 444 mutex_enter(&bucket->ftb_mtx); in fasttrap_fork() 445 for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) { in fasttrap_fork() 461 mutex_exit(&bucket->ftb_mtx); in fasttrap_fork() 504 fasttrap_bucket_t *bucket; in fasttrap_tracepoint_enable() local [all …]
|
/illumos-gate/usr/src/lib/libnisdb/ |
H A D | db_index.cc | 191 unsigned long bucket; in lookup() local 200 bucket = hval % table_size; in lookup() 202 db_index_entry_p fst = tab[bucket ]; in lookup() 229 unsigned long bucket; in remove() local 242 bucket = hval % table_size; in remove() 244 fst = tab[bucket]; in remove() 247 else if (fst->remove(&tab[bucket], case_insens, hval, index_value, in remove() 279 unsigned long bucket; in add() local 280 bucket = hval %table_size; in add() 281 fst = tab[bucket]; in add() [all …]
|
H A D | db_dictionary.cc | 206 db_table_desc* bucket; in delete_dictionary() local 212 bucket = dict->tables.tables_val[i]; in delete_dictionary() 213 if (bucket) in delete_dictionary() 214 delete_bucket(bucket); in delete_dictionary() 226 relocate_bucket(db_table_desc* bucket, in relocate_bucket() argument 231 for (np = bucket; np != NULL; np = next_np) { in relocate_bucket() 244 enumerate_bucket(db_table_desc* bucket, db_status(*func)(db_table_desc *)) in enumerate_bucket() argument 249 for (np = bucket; np != NULL; np = np->next) { in enumerate_bucket() 263 search_bucket(db_table_desc* bucket, unsigned long hval, char *target) in search_bucket() argument 267 for (np = bucket; np != NULL; np = np->next) { in search_bucket() [all …]
|
/illumos-gate/usr/src/cmd/dtrace/test/tst/common/java_api/src/ |
H A D | TestBean.java | 207 Distribution.Bucket bucket; in getLogDistribution() local 219 bucket = new Distribution.Bucket(-1, -1, n++); in getLogDistribution() 220 buckets.add(bucket); in getLogDistribution() 221 bucket = new Distribution.Bucket(0, 0, n++); in getLogDistribution() 222 buckets.add(bucket); in getLogDistribution() 223 bucket = new Distribution.Bucket(1, 1, n++); in getLogDistribution() 224 buckets.add(bucket); in getLogDistribution() 237 bucket = new Distribution.Bucket(lowerBound, upperBound, n++); in getLogDistribution() 238 buckets.add(bucket); in getLogDistribution() 249 Distribution.Bucket bucket; in getLinearDistribution() local [all …]
|
/illumos-gate/usr/src/uts/common/refhash/ |
H A D | refhash.c | 77 uint_t bucket; in refhash_insert() local 80 bucket = hp->rh_hash(obj_to_tag(hp, op)) % hp->rh_bucket_count; in refhash_insert() 85 list_insert_tail(&hp->rh_buckets[bucket], lp); in refhash_insert() 93 uint_t bucket; in refhash_delete() local 95 bucket = hp->rh_hash(obj_to_tag(hp, op)) % hp->rh_bucket_count; in refhash_delete() 96 list_remove(&hp->rh_buckets[bucket], lp); in refhash_delete() 116 uint_t bucket; in refhash_lookup() local 120 bucket = hp->rh_hash(tp) % hp->rh_bucket_count; in refhash_lookup() 121 for (lp = list_head(&hp->rh_buckets[bucket]); lp != NULL; in refhash_lookup() 122 lp = list_next(&hp->rh_buckets[bucket], lp)) { in refhash_lookup()
|
/illumos-gate/usr/src/uts/common/inet/ip/ |
H A D | ip_sadb.c | 97 ipsec_getassocbyconn(isaf_t *bucket, ip_xmit_attr_t *ixa, uint32_t *src, in ipsec_getassocbyconn() argument 117 ASSERT(MUTEX_HELD(&bucket->isaf_lock)); in ipsec_getassocbyconn() 142 if ((bucket == ipr->ipsr_bucket) && in ipsec_getassocbyconn() 143 (bucket->isaf_gen == ipr->ipsr_gen) && in ipsec_getassocbyconn() 192 for (retval = bucket->isaf_ipsa; retval != NULL; in ipsec_getassocbyconn() 425 ipr->ipsr_bucket = bucket; in ipsec_getassocbyconn() 426 ipr->ipsr_gen = bucket->isaf_gen; in ipsec_getassocbyconn() 485 if (sadb_insertassoc(retval, bucket) != 0) { in ipsec_getassocbyconn() 491 (void) sadb_insertassoc(retval, bucket); in ipsec_getassocbyconn() 510 ipsec_getassocbyspi(isaf_t *bucket, uint32_t spi, uint32_t *src, uint32_t *dst, in ipsec_getassocbyspi() argument [all …]
|
/illumos-gate/usr/src/lib/libgen/common/ |
H A D | isencrypt.c | 76 int bucket[8]; in isencrypt() local 79 for (i = 0; i < 8; i++) bucket[i] = 0; in isencrypt() 81 for (i = 0; i < 64; i++) bucket[(fbuf[i]>>5)&07] += 1; in isencrypt() 84 for (i = 0; i < 8; i++) cs += (bucket[i]-8)*(bucket[i]-8); in isencrypt()
|
/illumos-gate/usr/src/cmd/sgs/link_audit/common/ |
H A D | hash.c | 65 long bucket; in get_hash() local 69 tmp = tbl->table[bucket = hash_string(key, tbl->size)]; in get_hash() 71 tmp = tbl->table[bucket = labs((long)key) % tbl->size]; in get_hash() 107 new->next_entry = tbl->table[bucket]; in get_hash() 108 tbl->table[bucket] = new; in get_hash() 139 ulong_t bucket; in del_hash() local 143 bucket = hash_string(key, tbl->size); in del_hash() 145 bucket = labs((long)key) % tbl->size; in del_hash() 148 if ((tmp = tbl->table[bucket]) == NULL) { in del_hash() 184 tbl->table[bucket] = tmp->next_entry; in del_hash()
|
/illumos-gate/usr/src/uts/common/io/ |
H A D | str_conf.c | 131 uint_t bucket; in i_fmodsw_hash_insert() local 137 bucket = FMODSW_HASH(fp->f_name); in i_fmodsw_hash_insert() 138 for (pp = &(fmodsw_hash[bucket]); (p = *pp) != NULL; in i_fmodsw_hash_insert() 153 uint_t bucket; in i_fmodsw_hash_remove() local 159 bucket = FMODSW_HASH(name); in i_fmodsw_hash_remove() 160 for (pp = &(fmodsw_hash[bucket]); (p = *pp) != NULL; in i_fmodsw_hash_remove() 178 uint_t bucket; in i_fmodsw_hash_find() local 184 bucket = FMODSW_HASH(name); in i_fmodsw_hash_find() 185 for (p = fmodsw_hash[bucket]; p != NULL; p = p->f_next) in i_fmodsw_hash_find()
|
/illumos-gate/usr/src/uts/common/os/ |
H A D | taskq.c | 1148 taskq_bucket_t *bucket = NULL; /* Which bucket needs extension */ in taskq_dispatch() local 1201 bucket = tq->tq_buckets; in taskq_dispatch() 1229 bucket = b; in taskq_dispatch() 1265 taskq_bucket_extend(bucket); in taskq_dispatch() 1266 TQ_STAT(bucket, tqs_disptcreates); in taskq_dispatch() 1267 if ((tqe = taskq_bucket_dispatch(bucket, func, arg)) != NULL) in taskq_dispatch() 1271 ASSERT(bucket != NULL); in taskq_dispatch() 1279 if (!taskq_ent_exists(tq, taskq_bucket_extend, bucket)) { in taskq_dispatch() 1281 TQ_ENQUEUE_FRONT(tq, tqe1, taskq_bucket_extend, bucket); in taskq_dispatch() 1704 taskq_bucket_t *bucket = tqe->tqent_un.tqent_bucket; in taskq_d_thread() local [all …]
|
/illumos-gate/usr/src/cmd/sgs/crle/common/ |
H A D | hash.c | 58 int bucket; in get_hash() local 67 bucket = hashval % tbl->t_size; in get_hash() 70 for (ent = tbl->t_entry[bucket]; ent != NULL; in get_hash() 98 ent->e_next = tbl->t_entry[bucket]; in get_hash() 99 tbl->t_entry[bucket] = ent; in get_hash()
|
/illumos-gate/usr/src/tools/protocmp/ |
H A D | depend.c | 49 int bucket; in processed_package() local 52 bucket = HASH(pkgname); in processed_package() 53 for (tmp = packages[bucket]; tmp != NULL; tmp = tmp->next) { in processed_package() 63 int bucket; in mark_processed() local 66 bucket = HASH(pkgname); in mark_processed() 70 tmp->next = packages[bucket]; in mark_processed() 71 packages[bucket] = tmp; in mark_processed()
|
H A D | list.c | 247 int bucket; in add_elem() local 250 bucket = hash(e->name) % list->num_of_buckets; in add_elem() 251 if (list->list[bucket]) { in add_elem() 252 for (cur = list->list[bucket]; cur; cur = cur->next) { in add_elem() 271 e->next = list->list[bucket]; in add_elem() 272 list->list[bucket] = e; in add_elem()
|
/illumos-gate/usr/src/uts/common/fs/smbsrv/ |
H A D | smb2_lease.c | 85 smb_llist_t *bucket; in smb2_lease_rele() local 101 bucket = ls->ls_bucket; in smb2_lease_rele() 102 smb_llist_enter(bucket, RW_WRITER); in smb2_lease_rele() 106 smb_llist_remove(bucket, ls); in smb2_lease_rele() 113 smb_llist_exit(bucket); in smb2_lease_rele() 156 smb_llist_t *bucket; in smb2_lease_create() local 170 bucket = &ht->buckets[hashkey].b_list; in smb2_lease_create() 175 newlease->ls_bucket = bucket; in smb2_lease_create() 184 smb_llist_enter(bucket, RW_WRITER); in smb2_lease_create() 185 for (lease = smb_llist_head(bucket); lease != NULL; in smb2_lease_create() [all …]
|
/illumos-gate/usr/src/cmd/abi/spectrans/spec2map/ |
H A D | bucket.h | 35 struct bucket *bl_bucket; 39 typedef struct bucket { struct 41 struct bucket *b_parent; argument 43 struct bucket *b_thread; argument
|
/illumos-gate/usr/src/cmd/cmd-inet/usr.bin/pppd/ |
H A D | options.c | 682 hashentry_t *bucket; local 684 bucket = hash_tbl[opt_hash(name)]; 685 for (; bucket != NULL; bucket = bucket->next) { 686 if (bucket->opt.p->name != NULL) { 687 if ((strcmp(bucket->opt.p->name, name) == 0) && 688 !(bucket->opt.p->flags & OPT_DISABLE)) { 689 return (bucket->opt.p); 893 register hashentry_t *bucket; local 913 bucket = hash_tbl[loc]; 914 if (bucket != NULL) { [all …]
|
/illumos-gate/usr/src/cmd/truss/ |
H A D | htbl.c | 119 unsigned int bucket; in add_fcall() local 124 bucket = hash_str(key, htp->size); in add_fcall() 125 cur = &htp->tbl[bucket]; in add_fcall() 193 new->bucket = b; in iterate_hash() 231 i = itr->bucket; in iter_next() 243 itr->bucket = i; in iter_next()
|
/illumos-gate/usr/src/cmd/sendmail/db/mp/ |
H A D | mp_pr.c | 176 size_t bucket, fmap[FMAP_ENTRIES + 1]; local 239 bucket = 0; bucket < mp->htab_buckets; ++htabp, ++bucket) { 240 if (SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh) != NULL) 241 (void)fprintf(fp, "%lu:\n", (u_long)bucket); 242 for (bhp = SH_TAILQ_FIRST(&dbmp->htab[bucket], __bh);
|
/illumos-gate/usr/src/contrib/ast/src/lib/libast/hash/ |
H A D | hashscan.c | 55 pos->bucket = ∅ in hashscan() 92 b = pos->bucket; in hashnext() 123 return(pos->tab->root->last.bucket = pos->bucket = b); in hashnext()
|