Use standard RNG

The custom random number generator can now be replaced with a C++11
RNG. This greatly improves the reliability and trustworthiness of it.

In addition to this, the conversion of the RNG to a thread-local object
removes the race condition that was present in the previous
implementation. It also theoretically improves performance by a tiny bit.
This commit is contained in:
Markus Mäkelä
2018-08-13 01:01:38 +03:00
parent 4017466527
commit 2852530893
12 changed files with 40 additions and 135 deletions

View File

@ -53,7 +53,7 @@
#include <maxscale/session.h>
#include <maxscale/utils.h>
#include <maxscale/version.h>
#include <maxscale/random_jkiss.h>
#include <maxscale/random.h>
#include "internal/admin.hh"
#include "internal/config.hh"
@ -1783,9 +1783,6 @@ int main(int argc, char **argv)
goto return_main;
}
/** Initialize the random number generator */
random_jkiss_init();
if (!utils_init())
{
const char* logerr = "Failed to initialise utility library.";