summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_job.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nxt_job.c')
-rw-r--r--src/nxt_job.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/src/nxt_job.c b/src/nxt_job.c
index 1e08cc26..995fd89b 100644
--- a/src/nxt_job.c
+++ b/src/nxt_job.c
@@ -7,11 +7,9 @@
#include <nxt_main.h>
-#if (NXT_THREADS)
static void nxt_job_thread_trampoline(nxt_task_t *task, void *obj, void *data);
static void nxt_job_thread_return_handler(nxt_task_t *task, void *obj,
void *data);
-#endif
void *
@@ -110,8 +108,6 @@ nxt_job_start(nxt_task_t *task, nxt_job_t *job, nxt_work_handler_t handler)
{
nxt_debug(task, "%s start", job->name);
-#if (NXT_THREADS)
-
if (job->thread_pool != NULL) {
nxt_int_t ret;
@@ -129,14 +125,10 @@ nxt_job_start(nxt_task_t *task, nxt_job_t *job, nxt_work_handler_t handler)
handler = job->abort_handler;
}
-#endif
-
handler(job->task, job, job->data);
}
-#if (NXT_THREADS)
-
/* A trampoline function is called by a thread pool thread. */
static void
@@ -158,16 +150,12 @@ nxt_job_thread_trampoline(nxt_task_t *task, void *obj, void *data)
}
}
-#endif
-
void
nxt_job_return(nxt_task_t *task, nxt_job_t *job, nxt_work_handler_t handler)
{
nxt_debug(task, "%s return", job->name);
-#if (NXT_THREADS)
-
if (job->engine != NULL) {
/* A return function is called in thread pool thread context. */
@@ -179,8 +167,6 @@ nxt_job_return(nxt_task_t *task, nxt_job_t *job, nxt_work_handler_t handler)
return;
}
-#endif
-
if (nxt_slow_path(job->cancel)) {
nxt_debug(task, "%s cancellation", job->name);
handler = job->abort_handler;
@@ -191,8 +177,6 @@ nxt_job_return(nxt_task_t *task, nxt_job_t *job, nxt_work_handler_t handler)
}
-#if (NXT_THREADS)
-
static void
nxt_job_thread_return_handler(nxt_task_t *task, void *obj, void *data)
{
@@ -211,5 +195,3 @@ nxt_job_thread_return_handler(nxt_task_t *task, void *obj, void *data)
handler(job->task, job, job->data);
}
-
-#endif