summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-03-09 18:03:27 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-03-09 18:03:27 +0300
commit6f2c9acd1841ca20a1388b34aef64e9f00459090 (patch)
treec0b9c1063ec464027d1ca29a793f6c0b7a6878d5 /src/nxt_main.c
parent5745e4826427155e29c1d520fe77811a0f570689 (diff)
downloadunit-6f2c9acd1841ca20a1388b34aef64e9f00459090.tar.gz
unit-6f2c9acd1841ca20a1388b34aef64e9f00459090.tar.bz2
Processes refactoring.
The cycle has been renamed to the runtime.
Diffstat (limited to 'src/nxt_main.c')
-rw-r--r--src/nxt_main.c14
1 files changed, 5 insertions, 9 deletions
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 <nxt_main.h>
-#include <nxt_cycle.h>
+#include <nxt_runtime.h>
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;