From de532922d9ab42aa15b40d47c8db53ac2af38500 Mon Sep 17 00:00:00 2001 From: Igor Sysoev Date: Mon, 23 Jan 2017 19:56:03 +0300 Subject: Introducing tasks. --- src/nxt_job_file.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'src/nxt_job_file.c') diff --git a/src/nxt_job_file.c b/src/nxt_job_file.c index bbebdee6..34f7ce08 100644 --- a/src/nxt_job_file.c +++ b/src/nxt_job_file.c @@ -8,8 +8,7 @@ #include -static void nxt_job_file_open_and_read(nxt_thread_t *thr, void *obj, - void *data); +static void nxt_job_file_open_and_read(nxt_task_t *task, void *obj, void *data); static nxt_int_t nxt_job_file_open(nxt_job_file_t *jbf); static nxt_int_t nxt_job_file_info(nxt_job_file_t *jbf); static nxt_int_t nxt_job_file_mmap(nxt_job_file_t *jbf, size_t size); @@ -51,14 +50,14 @@ nxt_job_file_init(nxt_job_file_t *jbf) */ void -nxt_job_file_read(nxt_thread_t *thr, nxt_job_t *job) +nxt_job_file_read(nxt_task_t *task, nxt_job_t *job) { - nxt_job_start(thr, job, nxt_job_file_open_and_read); + nxt_job_start(task, job, nxt_job_file_open_and_read); } static void -nxt_job_file_open_and_read(nxt_thread_t *thr, void *obj, void *data) +nxt_job_file_open_and_read(nxt_task_t *task, void *obj, void *data) { size_t size; nxt_int_t n; @@ -70,7 +69,7 @@ nxt_job_file_open_and_read(nxt_thread_t *thr, void *obj, void *data) jbf = obj; file = &jbf->file; - nxt_log_debug(thr->log, "file job read: \"%FN\"", file->name); + nxt_debug(task, "file job read: \"%FN\"", file->name); if (file->fd != NXT_FILE_INVALID && jbf->close_before_open) { nxt_file_close(file); @@ -135,7 +134,7 @@ nxt_job_file_open_and_read(nxt_thread_t *thr, void *obj, void *data) } } - nxt_job_return(thr, &jbf->job, jbf->ready_handler); + nxt_job_return(task, &jbf->job, jbf->ready_handler); return; done: @@ -145,7 +144,7 @@ done: file->fd = NXT_FILE_INVALID; } - nxt_job_return(thr, &jbf->job, handler); + nxt_job_return(task, &jbf->job, handler); } -- cgit