xref: /unit/src/nxt_job_cache_file.c (revision 0:a63ceefd6ab0)
1 
2 /*
3  * Copyright (C) Igor Sysoev
4  * Copyright (C) NGINX, Inc.
5  */
6 
7 
8 #include <nxt_main.h>
9 
10 
11 nxt_job_cache_file_t *
12 nxt_job_cache_file_create(nxt_mem_pool_t *mp)
13 {
14     nxt_job_cache_file_t  *jbc;
15 
16     jbc = nxt_job_create(mp, sizeof(nxt_job_cache_file_t));
17 
18     if (nxt_fast_path(jbc != NULL)) {
19         jbc->file.fd = NXT_FILE_INVALID;
20         jbc->read_required = nxt_job_file_read_required;
21     }
22 
23     return jbc;
24 }
25