Mercurial > hg > nginx
comparison src/os/unix/ngx_files.h @ 5980:ccad84a174e0
Refactored sendfile() AIO preload.
This reduces layering violation and simplifies the logic of AIO preread, since
it's now triggered by the send chain function itself without falling back to
the copy filter. The context of AIO operation is now stored per file buffer,
which makes it possible to properly handle cases when multiple buffers come
from different locations, each with its own configuration.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Wed, 11 Feb 2015 17:52:15 +0300 |
parents | f1dfe7ff4511 |
children | 1fdba317ee6d |
comparison
equal
deleted
inserted
replaced
5979:b2920b517490 | 5980:ccad84a174e0 |
---|---|
373 #define ngx_set_stderr_n "dup2(STDERR_FILENO)" | 373 #define ngx_set_stderr_n "dup2(STDERR_FILENO)" |
374 | 374 |
375 | 375 |
376 #if (NGX_HAVE_FILE_AIO) | 376 #if (NGX_HAVE_FILE_AIO) |
377 | 377 |
378 ngx_int_t ngx_file_aio_init(ngx_file_t *file, ngx_pool_t *pool); | |
378 ssize_t ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, | 379 ssize_t ngx_file_aio_read(ngx_file_t *file, u_char *buf, size_t size, |
379 off_t offset, ngx_pool_t *pool); | 380 off_t offset, ngx_pool_t *pool); |
380 | 381 |
381 extern ngx_uint_t ngx_file_aio; | 382 extern ngx_uint_t ngx_file_aio; |
382 | 383 |