summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_socket.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-07-07 16:01:34 +0300
committerMax Romanov <max.romanov@nginx.com>2017-07-07 16:01:34 +0300
commite15b975e9d285f84535c7697f1d87568bfb08269 (patch)
tree6b8fabb22063407631b5d5078b66e8c27c018fc8 /src/nxt_port_socket.c
parent5529e9f0d164960f38f12f160844e5eba165e8ef (diff)
downloadunit-e15b975e9d285f84535c7697f1d87568bfb08269.tar.gz
unit-e15b975e9d285f84535c7697f1d87568bfb08269.tar.bz2
Work queue thread safety checks for DEBUG build.
Diffstat (limited to '')
-rw-r--r--src/nxt_port_socket.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/nxt_port_socket.c b/src/nxt_port_socket.c
index 883c45bb..56dfe755 100644
--- a/src/nxt_port_socket.c
+++ b/src/nxt_port_socket.c
@@ -235,6 +235,7 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data)
ssize_t n;
nxt_port_t *port;
struct iovec iov[NXT_IOBUF_MAX * 10];
+ nxt_work_queue_t *wq;
nxt_queue_link_t *link;
nxt_port_method_t m;
nxt_port_send_msg_t *msg;
@@ -301,22 +302,19 @@ nxt_port_write_handler(nxt_task_t *task, void *obj, void *data)
goto fail;
}
+ wq = &task->thread->engine->fast_work_queue;
+
if (msg->buf != plain_buf) {
/*
* Complete crafted mmap_msgs buf and restore msg->buf
* for regular completion call.
*/
- nxt_port_mmap_completion(task,
- port->socket.write_work_queue,
- msg->buf);
+ nxt_port_mmap_completion(task, wq, msg->buf);
msg->buf = plain_buf;
}
- msg->buf = nxt_sendbuf_completion(task,
- port->socket.write_work_queue,
- msg->buf,
- plain_size);
+ msg->buf = nxt_sendbuf_completion(task, wq, msg->buf, plain_size);
if (msg->buf != NULL) {
/*