diff options
author | Max Romanov <max.romanov@nginx.com> | 2019-08-16 00:48:11 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2019-08-16 00:48:11 +0300 |
commit | caea9d3c07543fecf9035ff2b406c190b714989e (patch) | |
tree | ec6ebad45d9aa7adec1a6f3a9962934475cdbced /src/nxt_port_memory.c | |
parent | 4d7576d3239b3be6db2b1083a3d99b31ce4f4cd0 (diff) | |
download | unit-caea9d3c07543fecf9035ff2b406c190b714989e.tar.gz unit-caea9d3c07543fecf9035ff2b406c190b714989e.tar.bz2 |
Fixing multi-thread port write racing conditions.
Diffstat (limited to 'src/nxt_port_memory.c')
-rw-r--r-- | src/nxt_port_memory.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nxt_port_memory.c b/src/nxt_port_memory.c index b908041c..b7068c88 100644 --- a/src/nxt_port_memory.c +++ b/src/nxt_port_memory.c @@ -798,7 +798,7 @@ nxt_port_mmap_get_incoming_buf(nxt_task_t *task, nxt_port_t *port, void nxt_port_mmap_write(nxt_task_t *task, nxt_port_t *port, - nxt_port_send_msg_t *msg, nxt_sendbuf_coalesce_t *sb) + nxt_port_send_msg_t *msg, nxt_sendbuf_coalesce_t *sb, void *mmsg_buf) { size_t bsize; nxt_buf_t *bmem; @@ -811,7 +811,7 @@ nxt_port_mmap_write(nxt_task_t *task, nxt_port_t *port, "via shared memory", sb->size, port->pid); bsize = sb->niov * sizeof(nxt_port_mmap_msg_t); - mmap_msg = port->mmsg_buf; + mmap_msg = mmsg_buf; bmem = msg->buf; @@ -841,7 +841,7 @@ nxt_port_mmap_write(nxt_task_t *task, nxt_port_t *port, port->pid); } - sb->iobuf[0].iov_base = port->mmsg_buf; + sb->iobuf[0].iov_base = mmsg_buf; sb->iobuf[0].iov_len = bsize; sb->niov = 1; sb->size = bsize; |