From a7ad493aa67c5f5204afbe50a42108d9e5b07c31 Mon Sep 17 00:00:00 2001 From: Valentin Bartenev Date: Sat, 14 Mar 2015 17:37:25 +0300 Subject: Added support for offloading read() in thread pools. --- src/core/ngx_buf.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core/ngx_buf.h') diff --git a/src/core/ngx_buf.h b/src/core/ngx_buf.h index 9ee1c588c..f652b20ef 100644 --- 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; -- cgit v1.2.3