summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_job_cache_file.c
diff options
context:
space:
mode:
authorIgor Sysoev <igor@sysoev.ru>2017-01-17 20:00:00 +0300
committerIgor Sysoev <igor@sysoev.ru>2017-01-17 20:00:00 +0300
commit16cbf3c076a0aca6d47adaf3f719493674cf2363 (patch)
treee6530480020f62a2bdbf249988ec3e2a751d3927 /src/nxt_job_cache_file.c
downloadunit-16cbf3c076a0aca6d47adaf3f719493674cf2363.tar.gz
unit-16cbf3c076a0aca6d47adaf3f719493674cf2363.tar.bz2
Initial version.
Diffstat (limited to 'src/nxt_job_cache_file.c')
-rw-r--r--src/nxt_job_cache_file.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/nxt_job_cache_file.c b/src/nxt_job_cache_file.c
new file mode 100644
index 00000000..786691f6
--- /dev/null
+++ b/src/nxt_job_cache_file.c
@@ -0,0 +1,24 @@
+
+/*
+ * Copyright (C) Igor Sysoev
+ * Copyright (C) NGINX, Inc.
+ */
+
+
+#include <nxt_main.h>
+
+
+nxt_job_cache_file_t *
+nxt_job_cache_file_create(nxt_mem_pool_t *mp)
+{
+ nxt_job_cache_file_t *jbc;
+
+ jbc = nxt_job_create(mp, sizeof(nxt_job_cache_file_t));
+
+ if (nxt_fast_path(jbc != NULL)) {
+ jbc->file.fd = NXT_FILE_INVALID;
+ jbc->read_required = nxt_job_file_read_required;
+ }
+
+ return jbc;
+}