From 6f2c9acd1841ca20a1388b34aef64e9f00459090 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Thu, 9 Mar 2017 18:03:27 +0300 Subject: Processes refactoring. The cycle has been renamed to the runtime. --- src/nxt_main.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/nxt_main.c') diff --git a/src/nxt_main.c b/src/nxt_main.c index 4219fdea..7cd032d5 100644 --- a/src/nxt_main.c +++ b/src/nxt_main.c @@ -5,7 +5,7 @@ */ #include -#include +#include extern char **environ; @@ -14,8 +14,7 @@ extern char **environ; int nxt_cdecl main(int argc, char **argv) { - nxt_int_t ret; - nxt_thread_t *thr; + nxt_int_t ret; if (nxt_lib_start("nginext", argv, &environ) != NXT_OK) { return 1; @@ -23,20 +22,17 @@ main(int argc, char **argv) // nxt_main_log.level = NXT_LOG_INFO; - thr = nxt_thread(); - nxt_thread_time_update(thr); - nxt_main_log.handler = nxt_log_time_handler; - nxt_log_error(NXT_LOG_INFO, thr->log, "nginext started"); + nxt_log(&nxt_main_task, NXT_LOG_INFO, "nginext started"); - ret = nxt_cycle_create(thr, &nxt_main_task, NULL, NULL); + ret = nxt_runtime_create(&nxt_main_task); if (ret != NXT_OK) { return 1; } - nxt_event_engine_start(thr->engine); + nxt_event_engine_start(nxt_main_task.thread->engine); nxt_unreachable(); return 0; -- cgit