Exemplo n.º 1
0
void random_init(void)
{
    memset(&pool, 0, sizeof(pool));    /* just to start with */

    random_active = 1;

    noise_get_heavy(random_add_heavynoise_bitbybit);
    random_stir();
}
Exemplo n.º 2
0
void random_ref(void)
{
    if (!random_active) {
	memset(&pool, 0, sizeof(pool));    /* just to start with */

	noise_get_heavy(random_add_heavynoise_bitbybit);
	random_stir();

	//next_noise_collection = schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
    }

    random_active++;
}
Exemplo n.º 3
0
void random_init(void) {
    memset(&pool, 0, sizeof(pool));    /* just to start with */

    /*
     * For noise_get_heavy, we temporarily use `poolpos' as the
     * pointer for addition of noise, rather than extraction of
     * random numbers.
     */
    pool.poolpos = 0;
    noise_get_heavy(random_add_heavynoise);

    random_stir();
}
Exemplo n.º 4
0
void random_ref(void)
{
    if (!random_active) {
#ifdef MPEXT
        InitializeCriticalSection(&noise_section);
#endif
	memset(&pool, 0, sizeof(pool));    /* just to start with */

	noise_get_heavy(random_add_heavynoise_bitbybit);
	random_stir();

	next_noise_collection =
	    schedule_timer(NOISE_REGULAR_INTERVAL, random_timer, &pool);
    }

#ifdef MPEXT
    EnterCriticalSection(&noise_section);
#endif
    random_active++;
#ifdef MPEXT
    LeaveCriticalSection(&noise_section);
#endif
}