diff src/core/ngx_buf.h @ 6022:1fdba317ee6d

Added support for offloading read() in thread pools.
author Valentin Bartenev <vbart@nginx.com>
date Sat, 14 Mar 2015 17:37:25 +0300
parents 0f234ee664f7
children e8d4c9e9682a
line wrap: on
line diff
--- a/src/core/ngx_buf.h
+++ b/src/core/ngx_buf.h
@@ -90,15 +90,23 @@ struct ngx_output_chain_ctx_s {
 #endif
     unsigned                     need_in_memory:1;
     unsigned                     need_in_temp:1;
-#if (NGX_HAVE_FILE_AIO)
+#if (NGX_HAVE_FILE_AIO || NGX_THREADS)
     unsigned                     aio:1;
+#endif
 
+#if (NGX_HAVE_FILE_AIO)
     ngx_output_chain_aio_pt      aio_handler;
 #if (NGX_HAVE_AIO_SENDFILE)
     ssize_t                    (*aio_preload)(ngx_buf_t *file);
 #endif
 #endif
 
+#if (NGX_THREADS)
+    ngx_int_t                  (*thread_handler)(ngx_thread_task_t *task,
+                                                 ngx_file_t *file);
+    ngx_thread_task_t           *thread_task;
+#endif
+
     off_t                        alignment;
 
     ngx_pool_t                  *pool;