Lines Matching refs:ent
50 isc_entropy_t *ent = source->ent;
70 entropypool_adddata(ent, buf, ndesired, ndesired * 8);
84 fillpool(isc_entropy_t *ent, unsigned int desired, isc_boolean_t blocking) {
92 REQUIRE(VALID_ENTROPY(ent));
119 if ((ent->pool.entropy >= RND_POOLBITS / 4)
120 && (ent->pool.pseudo <= RND_POOLBITS / 4))
132 needed = ISC_MIN(needed, RND_POOLBITS - ent->pool.entropy);
139 if (ent->initialized < THRESHOLD_BITS)
140 needed = ISC_MAX(needed, THRESHOLD_BITS - ent->initialized);
152 if (ent->nextsource == NULL) {
153 ent->nextsource = ISC_LIST_HEAD(ent->sources);
154 if (ent->nextsource == NULL)
157 source = ent->nextsource;
164 for (nsource = 0; nsource < ent->nsources; nsource++) {
181 source = ISC_LIST_HEAD(ent->sources);
183 ent->nextsource = source;
189 if (!(ent->nextsource == firstsource && added == 0)) {
199 source = ISC_LIST_HEAD(ent->sources);
220 if (ent->initialized < THRESHOLD_BITS)
221 ent->initialized += added;
227 * Requires "ent" be locked.
241 isc_entropy_createfilesource(isc_entropy_t *ent, const char *fname) {
247 REQUIRE(VALID_ENTROPY(ent));
250 LOCK(&ent->lock);
265 source = isc_mem_get(ent->mctx, sizeof(isc_entropysource_t));
276 source->ent = ent;
286 ISC_LIST_APPEND(ent->sources, source, link);
287 ent->nsources++;
289 UNLOCK(&ent->lock);
297 isc_mem_put(ent->mctx, source, sizeof(isc_entropysource_t));
299 UNLOCK(&ent->lock);