Lines Matching refs:status

91 static inline uint32_t rand_range32(const php_random_algo *algo, php_random_status *status, uint32_…  in rand_range32()  argument
100 uint32_t r = algo->generate(status); in rand_range32()
102 total_size += status->last_generated_size; in rand_range32()
135 uint32_t r = algo->generate(status); in rand_range32()
137 total_size += status->last_generated_size; in rand_range32()
147 static inline uint64_t rand_range64(const php_random_algo *algo, php_random_status *status, uint64_… in rand_range64() argument
156 uint64_t r = algo->generate(status); in rand_range64()
158 total_size += status->last_generated_size; in rand_range64()
191 uint64_t r = algo->generate(status); in rand_range64()
193 total_size += status->last_generated_size; in rand_range64()
238 if (randomizer->is_userland_algo && randomizer->status) { in randomizer_free_obj()
239 php_random_status_free(randomizer->status, false); in randomizer_free_obj()
247 php_random_status *status = pecalloc(1, sizeof(php_random_status), persistent); in php_random_status_alloc() local
249 status->last_generated_size = algo->generate_size; in php_random_status_alloc()
250 status->state = algo->state_size > 0 ? pecalloc(1, algo->state_size, persistent) : NULL; in php_random_status_alloc()
252 return status; in php_random_status_alloc()
263 PHPAPI void php_random_status_free(php_random_status *status, const bool persistent) in php_random_status_free() argument
265 if (status->state) { in php_random_status_free()
266 pefree(status->state, persistent); in php_random_status_free()
268 pefree(status, persistent); in php_random_status_free()
279 engine->status = php_random_status_alloc(engine->algo, false); in php_random_engine_common_init()
289 if (engine->status) { in php_random_engine_common_free_object()
290 php_random_status_free(engine->status, false); in php_random_engine_common_free_object()
302 if (old_engine->status) { in php_random_engine_common_clone_object()
303 …new_engine->status = php_random_status_copy(old_engine->algo, old_engine->status, new_engine->stat… in php_random_engine_common_clone_object()
312 PHPAPI zend_long php_random_range(const php_random_algo *algo, php_random_status *status, zend_long… in php_random_range() argument
317 return (zend_long) (rand_range64(algo, status, umax) + min); in php_random_range()
320 return (zend_long) (rand_range32(algo, status, umax) + min); in php_random_range()
334 php_random_status *status = RANDOM_G(mt19937); in php_random_default_status() local
337 ((php_random_status_state_mt19937 *)status->state)->mode = MT_RAND_MT19937; in php_random_default_status()
338 php_random_mt19937_seed_default(status->state); in php_random_default_status()
342 return status; in php_random_default_status()
416 php_random_status *status = RANDOM_G(combined_lcg); local
419 php_random_combinedlcg_seed_default(status->state);
423 return php_random_algo_combinedlcg.generate(status) * 4.656613e-10;
453 php_random_status *status = php_random_default_status(); local
454 php_random_status_state_mt19937 *s = status->state;
683 php_random_status *status = RANDOM_G(mt19937); local
684 php_random_status_state_mt19937 *state = status->state;
701 php_random_mt19937_seed_default(status->state);
703 php_random_algo_mt19937.seed(status, (uint64_t) seed);