diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-01-23 19:56:03 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-01-23 19:56:03 +0300 |
commit | de532922d9ab42aa15b40d47c8db53ac2af38500 (patch) | |
tree | d6b7c6b21c7a6e0e3620a3e0c7198e63454d05e3 /src/nxt_lib.c | |
parent | 16cbf3c076a0aca6d47adaf3f719493674cf2363 (diff) | |
download | unit-de532922d9ab42aa15b40d47c8db53ac2af38500.tar.gz unit-de532922d9ab42aa15b40d47c8db53ac2af38500.tar.bz2 |
Introducing tasks.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_lib.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/nxt_lib.c b/src/nxt_lib.c index 2013a4f6..ee36c91a 100644 --- a/src/nxt_lib.c +++ b/src/nxt_lib.c @@ -9,6 +9,8 @@ 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); @@ -70,6 +72,10 @@ nxt_lib_start(const char *app, char **argv, char ***envp) thr->time.signal = -1; #endif + nxt_main_task.thread = thr; + nxt_main_task.log = thr->log; + nxt_main_task.ident = nxt_task_next_ident(); + if (nxt_strerror_start() != NXT_OK) { return NXT_ERROR; } |