diff options
author | Igor Sysoev <igor@sysoev.ru> | 2018-03-28 19:10:02 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2018-03-28 19:10:02 +0300 |
commit | 18377ad288cc247ab49bef61965eb4f124a52cf0 (patch) | |
tree | 3724cf4ff85260acdfe96c4946cb225a530af485 /src/nxt_sendbuf.c | |
parent | cd340b09e677bb07c7952957893aac28d3491361 (diff) | |
download | unit-18377ad288cc247ab49bef61965eb4f124a52cf0.tar.gz unit-18377ad288cc247ab49bef61965eb4f124a52cf0.tar.bz2 |
nxt_port_buf_completion() and nxt_sendbuf_completion().
nxt_sendbuf_completion() has been renamed to nxt_port_buf_completion()
and moved to src/nxt_port_socket.c. nxt_sendbuf_completion0() has been
renamed to nxt_sendbuf_completion().
Diffstat (limited to '')
-rw-r--r-- | src/nxt_sendbuf.c | 63 |
1 files changed, 1 insertions, 62 deletions
diff --git a/src/nxt_sendbuf.c b/src/nxt_sendbuf.c index 704236ca..ed6fca36 100644 --- a/src/nxt_sendbuf.c +++ b/src/nxt_sendbuf.c @@ -376,68 +376,7 @@ nxt_sendbuf_update(nxt_buf_t *b, size_t sent) nxt_buf_t * -nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b, - size_t sent, nxt_bool_t mmap_mode) -{ - size_t size; - - while (b != NULL) { - - nxt_prefetch(b->next); - - if (!nxt_buf_is_sync(b)) { - - size = nxt_buf_used_size(b); - - if (size != 0) { - - if (sent == 0) { - break; - } - - if (nxt_buf_is_port_mmap(b) && mmap_mode) { - /* - * buffer has been sent to other side which is now - * responsible for shared memory bucket release - */ - b->is_port_mmap_sent = 1; - } - - if (sent < size) { - - if (nxt_buf_is_mem(b)) { - b->mem.pos += sent; - } - - if (nxt_buf_is_file(b)) { - b->file_pos += sent; - } - - break; - } - - /* b->mem.free is NULL in file-only buffer. */ - b->mem.pos = b->mem.free; - - if (nxt_buf_is_file(b)) { - b->file_pos = b->file_end; - } - - sent -= size; - } - } - - nxt_work_queue_add(wq, b->completion_handler, task, b, b->parent); - - b = b->next; - } - - return b; -} - - -nxt_buf_t * -nxt_sendbuf_completion0(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b) +nxt_sendbuf_completion(nxt_task_t *task, nxt_work_queue_t *wq, nxt_buf_t *b) { while (b != NULL) { |