summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port.c
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-10-04 15:01:15 +0300
committerMax Romanov <max.romanov@nginx.com>2017-10-04 15:01:15 +0300
commit85e485776b9c52e1762e6cc53406e956c604d9de (patch)
tree96212e3790e6d331ca4e91cfb02405068546038e /src/nxt_port.c
parent730f5a9dd9b3674246d06d18e05c8899e018ef5f (diff)
downloadunit-85e485776b9c52e1762e6cc53406e956c604d9de.tar.gz
unit-85e485776b9c52e1762e6cc53406e956c604d9de.tar.bz2
Using port 'post' facility to proxy remove pid message to workers.
Remove pid proxying to worker engines implementation was originally overcomplicated. Memory pool and 2 engine posts (there and back again) are optimized out and replaced with band new nxt_port_post() call.
Diffstat (limited to 'src/nxt_port.c')
-rw-r--r--src/nxt_port.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/nxt_port.c b/src/nxt_port.c
index 3f7dc411..948e4de6 100644
--- a/src/nxt_port.c
+++ b/src/nxt_port.c
@@ -283,7 +283,7 @@ nxt_port_new_port_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
nxt_port_write_enable(task, port);
- msg->new_port = port;
+ msg->u.new_port = port;
}
@@ -441,6 +441,8 @@ nxt_port_remove_pid_handler(nxt_task_t *task, nxt_port_recv_msg_t *msg)
nxt_memcpy(&pid, buf->mem.pos, sizeof(pid));
+ msg->u.removed_pid = pid;
+
nxt_debug(task, "port remove pid %PI handler", pid);
rt = task->thread->runtime;