Home | History | Annotate | Download | only in gen

Lines Matching defs:global

90 	 * If we couldn't get the thread-local state, get the global
102 * Same as arc4random_buf, but force use of the global state.
133 * Verify the PRNG is the global one, not the thread-local one,
146 * global state.
176 * By this point, the global state must be initialized -- if
182 * Get the PRNG, global or local. By this point, the PRNG
224 struct arc4random_prng *local, *global = &arc4random_global.prng;
230 * Get a sample from the global state to make sure the global
235 ATF_CHECK(!iszero(&global->arc4_prng, sizeof(global->arc4_prng)));
236 ATF_CHECK((globalepoch = global->arc4_epoch) != 0);
258 ATF_CHECK_EQ_MSG(globalepoch, global->arc4_epoch,
259 "global epoch was %u, now %u", globalepoch, global->arc4_epoch);
273 * Create a new thread to grab output from the global state,
274 * wait for it to complete, and verify the global epoch cache
276 * in this thread, we can't use the global state any more.)
280 ATF_CHECK_MSG(globalepoch != global->arc4_epoch,
281 "global epoch unchanged from %u", globalepoch);
393 struct arc4random_prng *local, *global = &arc4random_global.prng;
401 * Get a sample from the global state to make sure the global
406 ATF_CHECK(!iszero(&global->arc4_prng, sizeof(global->arc4_prng)));
407 ATF_CHECK(global->arc4_epoch != 0);
438 if (!iszero(global, sizeof(*global))) {
439 fprintf(stderr, "failed to zero global state\n");
464 * Verify the global state has been zeroed as expected. (This
469 ATF_CHECK(iszero(global, sizeof(*global)));
479 * Verify the child state is distinct. (The global state has
500 "Test the global state is used when address space limit is hit");
507 * Get a sample from the global state (and verify it was using
508 * the global state).
530 "Test the global state is used we run out of thread keys");
537 * Get a sample from the global state (and verify it was using
538 * the global state).
550 * sure we're using the global PRNG state now.
567 * Verify this had the effect of updating the global epoch,
568 * meaning we used the global state and not the per-thread
593 * Verify the arc4random state is _not_ the global state.
628 * Clear the arc4random global state, and the local state if it
646 * Make sure the global and local epochs did not change.
649 "global epoch: %d", arc4random_global.prng.arc4_epoch);