nxt_job_file.c (1:fdc027c56872) nxt_job_file.c (65:10688b89aa16)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7
8#include <nxt_main.h>
9
10
11static void nxt_job_file_open_and_read(nxt_task_t *task, void *obj, void *data);
12static nxt_int_t nxt_job_file_open(nxt_job_file_t *jbf);
13static nxt_int_t nxt_job_file_info(nxt_job_file_t *jbf);
14static nxt_int_t nxt_job_file_mmap(nxt_job_file_t *jbf, size_t size);
15static nxt_int_t nxt_job_file_read_data(nxt_job_file_t *jbf, size_t size);
16static nxt_int_t nxt_job_file_read_required(nxt_job_file_t *jbf);
17
18
19nxt_job_file_t *
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7
8#include <nxt_main.h>
9
10
11static void nxt_job_file_open_and_read(nxt_task_t *task, void *obj, void *data);
12static nxt_int_t nxt_job_file_open(nxt_job_file_t *jbf);
13static nxt_int_t nxt_job_file_info(nxt_job_file_t *jbf);
14static nxt_int_t nxt_job_file_mmap(nxt_job_file_t *jbf, size_t size);
15static nxt_int_t nxt_job_file_read_data(nxt_job_file_t *jbf, size_t size);
16static nxt_int_t nxt_job_file_read_required(nxt_job_file_t *jbf);
17
18
19nxt_job_file_t *
20nxt_job_file_create(nxt_mem_pool_t *mp)
20nxt_job_file_create(nxt_mp_t *mp)
21{
22 nxt_job_file_t *jbf;
23
24 jbf = nxt_job_create(mp, sizeof(nxt_job_file_t));
25
26 if (nxt_fast_path(jbf != NULL)) {
27 jbf->file.fd = NXT_FILE_INVALID;
28 jbf->file.accessed = NXT_FILE_ACCESSED_LONG_AGO;

--- 274 unchanged lines hidden ---
21{
22 nxt_job_file_t *jbf;
23
24 jbf = nxt_job_create(mp, sizeof(nxt_job_file_t));
25
26 if (nxt_fast_path(jbf != NULL)) {
27 jbf->file.fd = NXT_FILE_INVALID;
28 jbf->file.accessed = NXT_FILE_ACCESSED_LONG_AGO;

--- 274 unchanged lines hidden ---