summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_lib.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-07-10 21:07:12 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-07-10 21:07:12 +0300
commit3bccb7f358e27f932c951a55bc17aa113bfae5f0 (patch)
tree78fc9f0fc0b20c7df284208db901eacc7dd6b6a8 /src/nxt_lib.c
parentdc874cd22ef7ec72fc6e5927b1695d4a12536625 (diff)
downloadunit-3bccb7f358e27f932c951a55bc17aa113bfae5f0.tar.gz
unit-3bccb7f358e27f932c951a55bc17aa113bfae5f0.tar.bz2
Introducing thread-safe nxt_random().
Diffstat (limited to 'src/nxt_lib.c')
-rw-r--r--src/nxt_lib.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/nxt_lib.c b/src/nxt_lib.c
index d113bcbb..d5daa6e8 100644
--- a/src/nxt_lib.c
+++ b/src/nxt_lib.c
@@ -11,7 +11,6 @@ nxt_uint_t nxt_ncpu = 1;
nxt_uint_t nxt_pagesize;
nxt_task_t nxt_main_task;
nxt_atomic_t nxt_task_ident;
-nxt_random_t nxt_random_data;
nxt_thread_declare_data(nxt_thread_t, nxt_thread_context);
@@ -100,7 +99,7 @@ nxt_lib_start(const char *app, char **argv, char ***envp)
nxt_thread_spin_init(nxt_ncpu, 0);
- nxt_random_init(&nxt_random_data);
+ nxt_random_init(&thread->random);
nxt_pagesize = getpagesize();