summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_memory_int.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2017-09-18 17:35:24 +0300
committerMax Romanov <max.romanov@nginx.com>2017-09-18 17:35:24 +0300
commit4f7e00ef34345235f3b118749b5183a3f1ad5732 (patch)
treea0db28819ec6c3b03cc8f50d48e4c72814488b53 /src/nxt_port_memory_int.h
parent75a63256563a1eaf13fbd182800070849c3beb52 (diff)
downloadunit-4f7e00ef34345235f3b118749b5183a3f1ad5732.tar.gz
unit-4f7e00ef34345235f3b118749b5183a3f1ad5732.tar.bz2
Fixing shared memory thread safety issue.
Do not reuse shared memory segment with different port until this segment successfully received and indexed on other side. However, segment can be used to transfer data via the port it was sent at any time.
Diffstat (limited to 'src/nxt_port_memory_int.h')
-rw-r--r--src/nxt_port_memory_int.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_port_memory_int.h b/src/nxt_port_memory_int.h
index d82b6237..3c6c6ac6 100644
--- a/src/nxt_port_memory_int.h
+++ b/src/nxt_port_memory_int.h
@@ -49,6 +49,7 @@ typedef nxt_atomic_uint_t nxt_free_map_t;
struct nxt_port_mmap_header_s {
uint32_t id;
nxt_pid_t pid; /* For sanity check. */
+ nxt_port_id_t sent_over;
nxt_free_map_t free_map[MAX_FREE_IDX];
};