summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_app_log.c12
-rw-r--r--src/nxt_event_engine.c5
-rw-r--r--src/nxt_router.c2
-rw-r--r--src/nxt_runtime.c2
-rw-r--r--src/nxt_sprintf.c4
-rw-r--r--src/nxt_thread.h2
6 files changed, 22 insertions, 5 deletions
diff --git a/src/nxt_app_log.c b/src/nxt_app_log.c
index 0519c018..013fae46 100644
--- a/src/nxt_app_log.c
+++ b/src/nxt_app_log.c
@@ -21,9 +21,6 @@ nxt_log_time_handler(nxt_uint_t level, nxt_log_t *log, const char *fmt, ...)
{
u_char *p, *syslogmsg, *end;
va_list args;
- nxt_fid_t fid;
- const char *id;
- nxt_fiber_t *fib;
nxt_thread_t *thr;
nxt_time_string_t *time_cache;
u_char msg[NXT_MAX_ERROR_STR];
@@ -39,6 +36,11 @@ nxt_log_time_handler(nxt_uint_t level, nxt_log_t *log, const char *fmt, ...)
syslogmsg = p;
+#if 0
+ nxt_fid_t fid;
+ const char *id;
+ nxt_fiber_t *fib;
+
fib = nxt_fiber_self(thr);
if (fib != NULL) {
@@ -52,6 +54,10 @@ nxt_log_time_handler(nxt_uint_t level, nxt_log_t *log, const char *fmt, ...)
p = nxt_sprintf(p, end, id, &nxt_log_levels[level], nxt_pid,
nxt_thread_tid(thr), fid);
+#else
+ p = nxt_sprintf(p, end, "[%V] %PI#%PT ", &nxt_log_levels[level], nxt_pid,
+ nxt_thread_tid(thr));
+#endif
if (log->ident != 0) {
p = nxt_sprintf(p, end, "*%D ", log->ident);
diff --git a/src/nxt_event_engine.c b/src/nxt_event_engine.c
index ba297329..7f20c4c8 100644
--- a/src/nxt_event_engine.c
+++ b/src/nxt_event_engine.c
@@ -48,12 +48,14 @@ nxt_event_engine_create(nxt_task_t *task,
engine->batch = batch;
+#if 0
if (flags & NXT_ENGINE_FIBERS) {
engine->fibers = nxt_fiber_main_create(engine);
if (engine->fibers == NULL) {
goto fibers_fail;
}
}
+#endif
engine->current_work_queue = &engine->fast_work_queue;
@@ -138,9 +140,12 @@ signals_fail:
nxt_work_queue_cache_destroy(&engine->work_queue_cache);
nxt_free(engine->fibers);
+#if 0
fibers_fail:
nxt_free(engine);
+#endif
+
return NULL;
}
diff --git a/src/nxt_router.c b/src/nxt_router.c
index d9ba2d24..d3c60a94 100644
--- a/src/nxt_router.c
+++ b/src/nxt_router.c
@@ -1814,7 +1814,9 @@ nxt_router_thread_start(void *data)
engine->task.log = thread->log;
thread->engine = engine;
thread->task = &engine->task;
+#if 0
thread->fiber = &engine->fibers->fiber;
+#endif
engine->mem_pool = nxt_mp_create(4096, 128, 1024, 64);
diff --git a/src/nxt_runtime.c b/src/nxt_runtime.c
index ac0775ee..886bd1ca 100644
--- a/src/nxt_runtime.c
+++ b/src/nxt_runtime.c
@@ -292,7 +292,9 @@ nxt_runtime_event_engines(nxt_task_t *task, nxt_runtime_t *rt)
thread = task->thread;
thread->engine = engine;
+#if 0
thread->fiber = &engine->fibers->fiber;
+#endif
engine->id = rt->last_engine_id++;
diff --git a/src/nxt_sprintf.c b/src/nxt_sprintf.c
index 4b77725f..933ce997 100644
--- a/src/nxt_sprintf.c
+++ b/src/nxt_sprintf.c
@@ -500,12 +500,12 @@ nxt_vsprintf(u_char *buf, u_char *end, const char *fmt, va_list args)
ui64 = (uint64_t) va_arg(args, nxt_tid_t);
sign = 0;
goto number;
-
+#if 0
case 'F':
ui64 = (uint64_t) va_arg(args, nxt_fid_t);
sign = 0;
goto number;
-
+#endif
case 'H':
ui64 = (uint64_t) (uintptr_t) va_arg(args, pthread_t);
spf.hex = HEXADECIMAL;
diff --git a/src/nxt_thread.h b/src/nxt_thread.h
index 4a71a5a1..2ebc331d 100644
--- a/src/nxt_thread.h
+++ b/src/nxt_thread.h
@@ -159,11 +159,13 @@ struct nxt_thread_s {
nxt_event_engine_t *engine;
void *data;
+#if 0
/*
* Although pointer to a current fiber should be a property of
* engine->fibers, its placement here eliminates 2 memory accesses.
*/
nxt_fiber_t *fiber;
+#endif
nxt_random_t random;
};