Files | |
file | axutil_rand.h |
A simple thread safe and reentrant random number generator. | |
Functions | |
AXIS2_EXTERN int | axutil_rand (unsigned int *seedp) |
AXIS2_EXTERN int | axutil_rand_with_range (unsigned int *seedp, int start, int end) |
AXIS2_EXTERN unsigned int | axutil_rand_get_seed_value_based_on_time (const axutil_env_t *env) |
AXIS2_EXTERN int axutil_rand | ( | unsigned int * | seedp | ) |
This is reentrant and thread safe simple random number generator function. it is passed an pointer to an unsigned int state value which is used inside the function and changed in each call.
seedp | pointer to an unsigned int used as the internal state |
int
AXIS2_EXTERN unsigned int axutil_rand_get_seed_value_based_on_time | ( | const axutil_env_t * | env | ) |
A random seed value generated based on the time
AXIS2_EXTERN int axutil_rand_with_range | ( | unsigned int * | seedp, | |
int | start, | |||
int | end | |||
) |
This is reentrant and thread safe simple random number generator function. it is passed an pointer to an unsigned int state value which is used inside the function and changed in each call. Also it is passed a range in which the random number is selected
seedp | pointer to an unsigned int used as the internal state | |
start | start of the range | |
end | end of the range |
int