Mercurial > hg > nginx
comparison src/os/unix/ngx_os.h @ 5913:8e903522c17a
Introduced the ngx_output_chain_to_iovec() function.
It deduplicates code of the send chain functions and uses only preallocated
memory, which completely solves the problem mentioned in d1bde5c3c5d2.
author | Valentin Bartenev <vbart@nginx.com> |
---|---|
date | Tue, 07 Oct 2014 11:38:57 +0400 |
parents | ec81934727a1 |
children | 2c64b69daec5 |
comparison
equal
deleted
inserted
replaced
5912:de68ed551bfb | 5913:8e903522c17a |
---|---|
62 #else | 62 #else |
63 #define NGX_IOVS_PREALLOCATE IOV_MAX | 63 #define NGX_IOVS_PREALLOCATE IOV_MAX |
64 #endif | 64 #endif |
65 | 65 |
66 | 66 |
67 typedef struct { | |
68 struct iovec *iovs; | |
69 ngx_uint_t count; | |
70 size_t size; | |
71 ngx_uint_t nalloc; | |
72 } ngx_iovec_t; | |
73 | |
74 ngx_chain_t *ngx_output_chain_to_iovec(ngx_iovec_t *vec, ngx_chain_t *in, | |
75 size_t limit, ngx_log_t *log); | |
76 | |
77 | |
67 extern ngx_os_io_t ngx_os_io; | 78 extern ngx_os_io_t ngx_os_io; |
68 extern ngx_int_t ngx_ncpu; | 79 extern ngx_int_t ngx_ncpu; |
69 extern ngx_int_t ngx_max_sockets; | 80 extern ngx_int_t ngx_max_sockets; |
70 extern ngx_uint_t ngx_inherited_nonblocking; | 81 extern ngx_uint_t ngx_inherited_nonblocking; |
71 extern ngx_uint_t ngx_tcp_nodelay_and_tcp_nopush; | 82 extern ngx_uint_t ngx_tcp_nodelay_and_tcp_nopush; |