random.c revision ca41b452ede6feaa9d8739ec3cae19389a7b0d03
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * Copyright (C) 1999, 2000 Internet Software Consortium.
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * Permission to use, copy, modify, and distribute this software for any
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * purpose with or without fee is hereby granted, provided that the above
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * copyright notice and this permission notice appear in all copies.
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews RUNTIME_CHECK(isc_mutex_init(&rand_lock) == ISC_R_SUCCESS);
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrews RUNTIME_CHECK(isc_once_do(&once, initialize_rand) == ISC_R_SUCCESS);
3b83676e079a799f97ad8b76c057e6ecb0426b1dMark Andrewsisc_random_seed(isc_random_t *r, isc_uint32_t seed)