Introducing src_pid for mmap header for accurate buf completion.

This allows to use shared memory to communicate with main process.

This patch changes shared memory segment format and breaks compatibility
with older modules.
This commit is contained in:
Max Romanov
2017-10-19 17:36:45 +03:00
parent 39fd38a948
commit 6fd465f9d2
3 changed files with 30 additions and 16 deletions

View File

@@ -48,7 +48,8 @@ typedef nxt_atomic_uint_t nxt_free_map_t;
/* Mapped at the start of shared memory segment. */
struct nxt_port_mmap_header_s {
uint32_t id;
nxt_pid_t pid; /* For sanity check. */
nxt_pid_t src_pid; /* For sanity check. */
nxt_pid_t dst_pid; /* For sanity check. */
nxt_port_id_t sent_over;
nxt_free_map_t free_map[MAX_FREE_IDX];
};