nginx/src
Maxim Dounin ff33d9fa55 Simplified and improved sendfile() code on Linux.
The ngx_linux_sendfile() function is now used for both normal sendfile()
and sendfile in threads.  The ngx_linux_sendfile_thread() function was
modified to use the same interface as ngx_linux_sendfile(), and is simply
called from ngx_linux_sendfile() when threads are enabled.

Special return code NGX_DONE is used to indicate that a thread task was
posted and no further actions are needed.

If number of bytes sent is less that what we were sending, we now always
retry sending.  This is needed for sendfile() in threads as the number
of bytes we are sending might have been changed since the thread task
was posted.  And this is also needed for Linux 4.3+, as sendfile() might
be interrupted at any time and provides no indication if it was interrupted
or not (ticket #1174).
2017-03-28 18:15:39 +03:00
..
core Use ngx_array_init() to initialize arrays. 2017-03-28 11:28:42 +03:00
event Core: set nginx_shared_zone name via ngx_str_set(). 2017-03-28 11:28:51 +03:00
http Fixed ngx_open_cached_file() error handling. 2017-03-28 14:21:38 +03:00
mail Mail: don't emit separator in capability lists for APOP. 2017-03-06 17:56:23 +03:00
misc Style: fix typo. 2014-07-08 03:03:14 -07:00
os Simplified and improved sendfile() code on Linux. 2017-03-28 18:15:39 +03:00
stream Fixed ngx_open_cached_file() error handling. 2017-03-28 14:21:38 +03:00