summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_main.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-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;