Searched refs:hash (Results 1 - 25 of 401) sorted by relevance

1234567891011>>

/illumos-gate/usr/src/cmd/sgs/tools/common/
H A Dstrhash.c32 * classic Bernstein k=33 hash function
41 uint_t hash = 5381; local
45 hash = ((hash << 5) + hash) + c; /* hash * 33 + c */
46 return (hash);
/illumos-gate/usr/src/cmd/sgs/link_audit/common/
H A Dhash.h36 typedef struct hash { struct
44 } hash; typedef in typeref:struct:hash
46 extern hash *make_hash(size_t);
47 extern hash *make_ihash(size_t);
48 extern char **get_hash(hash *, char *);
49 extern char **find_hash(hash *, const char *);
50 extern char *del_hash(hash *, const char *);
51 extern size_t operate_hash(hash *, void (*)(), const char *);
52 extern void destroy_hash(hash *, int (*)(), const char *);
/illumos-gate/usr/src/uts/common/fs/
H A Dpkp_hash.c28 * Pearson's string hash
59 uint_t hash; local
62 hash = MOD2((key + len), PKP_HASH_SIZE);
65 hash = MOD2((hash + str[i]), PKP_HASH_SIZE);
66 hash = pkp_tab[hash];
69 return (hash);
/illumos-gate/usr/src/common/ficl/
H A Dhash.c3 #define FICL_ASSERT_PHASH(hash, expression) FICL_ASSERT(NULL, expression)
7 * Unlink all words in the hash that have addresses greater than or
12 ficlHashForget(ficlHash *hash, void *where) argument
17 FICL_ASSERT_PHASH(hash, hash);
18 FICL_ASSERT_PHASH(hash, where);
20 for (i = 0; i < hash->size; i++) {
21 pWord = hash->table[i];
27 hash->table[i] = pWord;
66 * Put a word into the hash tabl
70 ficlHashInsertWord(ficlHash *hash, ficlWord *word) argument
97 ficlHashLookup(ficlHash *hash, ficlString name, ficlUnsigned16 hashCode) argument
130 ficlHashReset(ficlHash *hash) argument
[all...]
H A Dprefix.c72 ficlHash *hash; local
83 hash = (ficlHash *)(word->param[0].p);
88 for (i = 0; i < (int)hash->size; i++) {
89 word = hash->table[i];
144 ficlHash *hash; local
151 hash = ficlDictionaryCreateWordlist(dictionary, 1);
152 hash->name = list_name;
153 ficlDictionaryAppendConstantPointer(dictionary, list_name, hash);
171 * dictionary->compilationWordlist = hash;
/illumos-gate/usr/src/lib/libnsctl/common/
H A Dhash.c37 hash_node_t **hash; local
39 hash = (hash_node_t **)calloc(HASH_PRIME, sizeof (hash_node_t *));
40 return (hash);
44 nsc_insert_node(hash_node_t **hash, void *data, const char *key) argument
61 node->next = hash[ index ];
62 hash[ index ] = node;
71 * Searches the hash to find a node.
78 nsc_lookup(hash_node_t **hash, const char *key) argument
84 node = hash[ index ];
94 nsc_remove_node(hash_node_t **hash, cha argument
132 nsc_remove_all(hash_node_t **hash, void (*callback)(void *)) argument
160 unsigned int hash, i; local
[all...]
/illumos-gate/usr/src/tools/ctf/cvt/
H A Dhash.c30 * Routines for manipulating hash tables
39 #include "hash.h"
43 struct hash { struct
94 hash_t *hash; local
96 hash = xmalloc(sizeof (hash_t));
97 hash->h_buckets = xcalloc(sizeof (list_t *) * nbuckets);
98 hash->h_nbuckets = nbuckets;
99 hash->h_hashfn = hashfn ? hashfn : (int (*)())hash_def_hash;
100 hash->h_cmp = cmp ? cmp : (int (*)())hash_def_cmp;
102 return (hash);
106 hash_add(hash_t *hash, void *key) argument
127 hash_remove_cb(void *key1, void *key2, hash_t *hash) argument
133 hash_remove(hash_t *hash, void *key) argument
142 hash_match(hash_t *hash, void *key, int (*fun)(void *, void *), void *private) argument
166 hash_find_iter(hash_t *hash, void *key, int (*fun)(void *, void *), void *private) argument
194 hash_find(hash_t *hash, void *key, void **value) argument
211 hash_iter(hash_t *hash, int (*fun)(void *, void *), void *private) argument
230 hash_count(hash_t *hash) argument
241 hash_free(hash_t *hash, void (*datafree)(void *, void *), void *private) argument
255 hash_stats(hash_t *hash, int verbose) argument
[all...]
/illumos-gate/usr/src/uts/common/os/
H A Dmodhash.c27 * mod_hash: flexible hash table implementation.
29 * This is a reasonably fast, reasonably flexible hash table implementation
30 * which features pluggable hash algorithms to support storing arbitrary keys
32 * data. The hash uses chaining to resolve collisions, and does not feature a
33 * mechanism to grow the hash. Care must be taken to pick nchains to be large
35 * hash chains.
37 * The client of the hash is required to supply a number of items to support
38 * the various hash functions:
41 * A destructor is responsible for freeing an object when the hash
47 * - A hashing algorithm which returns a uint_t representing a hash inde
207 uint_t hash = 0; local
317 mod_hash_destroy_ptrhash(mod_hash_t *hash) argument
393 mod_hash_destroy_idhash(mod_hash_t *hash) argument
476 mod_hash_destroy_hash(mod_hash_t *hash) argument
518 i_mod_hash(mod_hash_t *hash, mod_hash_key_t key) argument
545 i_mod_hash_insert_nosync(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t val, mod_hash_hndl_t handle) argument
579 mod_hash_insert(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t val) argument
602 mod_hash_insert_reserve(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t val, mod_hash_hndl_t handle) argument
632 mod_hash_reserve(mod_hash_t *hash, mod_hash_hndl_t *handlep) argument
644 mod_hash_reserve_nosleep(mod_hash_t *hash, mod_hash_hndl_t *handlep) argument
658 mod_hash_cancel(mod_hash_t *hash, mod_hash_hndl_t *handlep) argument
670 i_mod_hash_remove_nosync(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val) argument
707 mod_hash_remove(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val) argument
725 mod_hash_replace(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t val) argument
750 mod_hash_destroy(mod_hash_t *hash, mod_hash_key_t key) argument
774 i_mod_hash_find_nosync(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val) argument
794 mod_hash_find(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val) argument
806 mod_hash_find_cb(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val, void (*find_cb)(mod_hash_key_t, mod_hash_val_t)) argument
822 mod_hash_find_cb_rval(mod_hash_t *hash, mod_hash_key_t key, mod_hash_val_t *val, int (*find_cb)(mod_hash_key_t, mod_hash_val_t), int *cb_rval) argument
838 i_mod_hash_walk_nosync(mod_hash_t *hash, uint_t (*callback)(mod_hash_key_t, mod_hash_val_t *, void *), void *arg) argument
866 mod_hash_walk(mod_hash_t *hash, uint_t (*callback)(mod_hash_key_t, mod_hash_val_t *, void *), void *arg) argument
882 i_mod_hash_clear_nosync(mod_hash_t *hash) argument
902 mod_hash_clear(mod_hash_t *hash) argument
[all...]
/illumos-gate/usr/src/lib/libtecla/common/
H A Dhash.c45 #include "hash.h"
56 StringMem *string_memory; /* Memory used to allocate hash strings */
60 * Define a hash symbol-table entry.
65 Symbol symbol; /* The symbol stored in the hash-entry */
66 HashNode *next; /* The next hash-table entry in a bucket list */
70 * Each hash-table bucket contains a linked list of entries that
71 * hash to the same bucket.
74 HashNode *head; /* The head of the bucket hash-node list */
79 * A hash-table consists of 'size' hash bucket
216 HashTable *hash; /* The table to be returned */ local
287 _del_HashTable(HashTable *hash) argument
340 _new_HashSymbol(HashTable *hash, const char *name, int code, void (*fn)(void), void *data, SYM_DEL_FN(*del_fn)) argument
395 _del_HashSymbol(HashTable *hash, const char *name) argument
436 _find_HashSymbol(HashTable *hash, const char *name) argument
478 _new_HashNode(HashTable *hash, const char *name, int code, void (*fn)(void), void *data, SYM_DEL_FN(*del_fn)) argument
535 _del_HashNode(HashTable *hash, HashNode *node) argument
570 _find_HashBucket(HashTable *hash, const char *name) argument
600 _find_HashNode(HashTable *hash, HashBucket *bucket, const char *name, HashNode **prev) argument
675 _clear_HashTable(HashTable *hash) argument
721 _scan_HashTable(HashTable *hash, HASH_SCAN_FN(*scan_fn), void *context) argument
[all...]
H A Dhash.h52 * function that deletes the application-data of a hash-table.
65 * symbol-table implementation. Each hash-table entry contains
99 * of objects. One HashMemory object can be shared between multiple hash
104 /* Create a free-list for allocation of hash tables and their nodes */
114 * hash.c.
126 /* Create a new hash-table */
131 /* Delete a reference to a hash-table */
133 HashTable *_del_HashTable(HashTable *hash);
135 /* Add an entry to a hash table */
137 Symbol *_new_HashSymbol(HashTable *hash, cons
[all...]
/illumos-gate/usr/src/uts/common/io/drm/
H A Ddrm_auth.c55 int hash; local
57 hash = drm_hash_magic(magic);
58 for (pt = dev->magiclist[hash].head; pt; pt = pt->next) {
71 int hash; local
74 hash = drm_hash_magic(magic);
83 if (dev->magiclist[hash].tail) {
84 dev->magiclist[hash].tail->next = entry;
85 dev->magiclist[hash].tail = entry;
87 dev->magiclist[hash].head = entry;
88 dev->magiclist[hash]
100 int hash; local
[all...]
/illumos-gate/usr/src/cmd/sendmail/db/include/
H A Ddb_shash.h16 * Look up something in a shared memory hash table. The "elt" argument
18 * structure it is that appears in the hash table. The comparison function
20 * begin: address of the beginning of the hash table.
23 * elt: the item for which we are searching in the hash table.
25 * nelems: the number of buckets in the hash table.
26 * hash_func: the hash function that operates on elements of the type of elt
30 * If the element is not in the hash table, this macro exits with result
33 #define HASHLOOKUP(begin, type, field, elt, r, n, hash, cmp) do { \
37 __ndx = hash(elt) % (n); \
48 * Insert a new entry into the hash tabl
[all...]
/illumos-gate/usr/src/cmd/nscd/
H A Dnscd_dbimpl.c37 * based on hash and has table. If the need arises in the future,
51 * This structure defines an instance of the hash entry
77 nscd_hash_t *hash; /* the current hash entry */ member in struct:cookie
84 * Calculate a hash for a string based on the elf_hash
85 * algorithm, hash is case insensitive. Uses tolower
112 * Scan a hash table for a matching hash entry. Assume 'str' is
168 unsigned long hash; local
174 hash
197 unsigned long hash; local
295 unsigned long hash; local
383 nscd_hash_t *hash; local
[all...]
/illumos-gate/usr/src/lib/lvm/libmeta/common/
H A Dmeta_stat.c51 int hash; local
54 hash = 0;
56 hash += *cp;
58 hash &= 0xf;
60 for (scp = statcache_head[hash]; scp != NULL; scp = scp->sc_next)
83 scp->sc_next = statcache_head[hash];
84 statcache_head[hash] = scp;
/illumos-gate/usr/src/cmd/refer/
H A Dinv6.c27 int hash = 0, hused = 0; local
47 if (hash < k) {
51 hfreq[hash] = ct;
52 while (hash < k) {
53 hpt[++hash] = lp;
54 hfreq[hash] = 0;
56 hpt[hash] = lp += iflong ? sizeof (long) : sizeof (int);
71 while (hash < nhash)
72 hpt[++hash] = lp;
/illumos-gate/usr/src/lib/gss_mechs/mech_krb5/krb5/rcache/
H A Drc_common.c24 * static int hash(krb5_donot_replay *rep, int hsize)
25 * returns hash value of *rep, between 0 and hsize - 1
29 hash(krb5_donot_replay *rep, int hsize) function
/illumos-gate/usr/src/cmd/spell/
H A Dhash.h36 extern int index[]; /* into dif table based on hi hash bits */
40 unsigned long hash(char *);
/illumos-gate/usr/src/lib/libdtrace_jni/java/src/org/opensolaris/os/dtrace/
H A DProgramInfo.java208 int hash = 17;
209 hash = (37 * hash) + minimumProbeAttributes.hashCode();
210 hash = (37 * hash) + minimumStatementAttributes.hashCode();
211 hash = (37 * hash) + matchingProbeCount;
212 return hash;
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/include/
H A Dold.h36 const struct krb5_hash_provider *hash,
42 const struct krb5_hash_provider *hash,
50 const struct krb5_hash_provider *hash,
H A Draw.h31 const struct krb5_hash_provider *hash,
37 const struct krb5_hash_provider *hash,
45 const struct krb5_hash_provider *hash,
H A Ddk.h31 const struct krb5_hash_provider *hash,
38 const struct krb5_hash_provider *hash,
46 krb5_const struct krb5_hash_provider *hash,
59 krb5_const struct krb5_hash_provider *hash,
76 const struct krb5_hash_provider *hash,
82 const struct krb5_hash_provider *hash,
90 const struct krb5_hash_provider *hash,
/illumos-gate/usr/src/lib/libast/common/hash/
H A Dhashlib.h27 * hash table library private definitions
45 Hash_hash_f hash; /* name hash routine */ member in struct:__anon2616
61 unsigned int hash; /* last lookup hash */
73 Hash_bucket_t** table; /* hash slot table */ \
76 #include <hash.h>
84 #define HASH(r,n,h) if (r->local->hash) h = r->namesize ? (*r->local->hash)(n, r->namesize) : (*r->local->hash)(
[all...]
/illumos-gate/usr/src/uts/common/gssapi/mechs/krb5/crypto/old/
H A Dold_encrypt.c38 const struct krb5_hash_provider *hash,
45 hashsize = hash->hashsize;
54 const struct krb5_hash_provider *hash,
67 hashsize = hash->hashsize;
69 krb5_old_encrypt_length(enc, hash, input->length, &enclen);
92 if ((ret = ((*(hash->hash))(context, 1, output, &datain))))
37 krb5_old_encrypt_length(const struct krb5_enc_provider *enc, const struct krb5_hash_provider *hash, size_t inputlen, size_t *length) argument
52 krb5_old_encrypt(krb5_context context, const struct krb5_enc_provider *enc, const struct krb5_hash_provider *hash, const krb5_keyblock *key, krb5_keyusage usage, const krb5_data *ivec, const krb5_data *input, krb5_data *output) argument
/illumos-gate/usr/src/uts/common/io/sfxge/
H A Dsfxge_hash.c42 * The largest amount of the data which the hash may be calculated over
54 uint32_t hash = 0; local
56 hash ^= cache[pos * (UINT8_MAX + 1) + *input];
59 return (hash);
66 uint32_t hash = 0; local
69 hash ^= toeplitz_hash(sp->s_toeplitz_cache, src_addr, pos, addr_size);
71 hash ^= toeplitz_hash(sp->s_toeplitz_cache, dst_addr, pos, addr_size);
74 hash ^= toeplitz_hash(sp->s_toeplitz_cache,
77 hash ^= toeplitz_hash(sp->s_toeplitz_cache,
80 return (hash);
[all...]
/illumos-gate/usr/src/lib/libcpc/common/
H A Dsubr.c163 __cpc_strhash_free(cpc_strhash_t *hash) argument
165 cpc_strhash_t *p = hash, *f;
175 * Insert a new key into the hash table.
184 __cpc_strhash_add(cpc_strhash_t *hash, char *key) argument
188 for (p = hash; p != NULL; p = p->next) {
197 tmp = hash->next;
198 hash->next = p;
204 hash->cur = p;
210 __cpc_strhash_next(cpc_strhash_t *hash) argument
214 if (hash
[all...]

Completed in 217 milliseconds

1234567891011>>