diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-08-11 19:20:13 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-08-11 19:20:13 +0300 |
commit | 6e31d6cd39be9d3f4ee680fc13c3fe42f5cd39e7 (patch) | |
tree | 2ef1d993674825791636486a0929ead424c8dd7a /src/nxt_port.h | |
parent | 3cbc22a6dc45abdeade4deb364601230ddca02c1 (diff) | |
download | unit-6e31d6cd39be9d3f4ee680fc13c3fe42f5cd39e7.tar.gz unit-6e31d6cd39be9d3f4ee680fc13c3fe42f5cd39e7.tar.bz2 |
Changing router to application shared memory exchange protocol.
The application process needs to request the shared memory segment from the
router instead of the latter pushing the segment before sending a request to
the application. This is required to simplify the communication between the
router and the application and to prepare the router for using the application
shared port and then the queue.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_port.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/nxt_port.h b/src/nxt_port.h index 838a7ffe..3a8a200a 100644 --- a/src/nxt_port.h +++ b/src/nxt_port.h @@ -27,6 +27,7 @@ struct nxt_port_handlers_s { nxt_port_handler_t new_port; nxt_port_handler_t get_port; nxt_port_handler_t mmap; + nxt_port_handler_t get_mmap; /* New process */ nxt_port_handler_t process_created; @@ -80,6 +81,7 @@ typedef enum { _NXT_PORT_MSG_NEW_PORT = nxt_port_handler_idx(new_port), _NXT_PORT_MSG_GET_PORT = nxt_port_handler_idx(get_port), _NXT_PORT_MSG_MMAP = nxt_port_handler_idx(mmap), + _NXT_PORT_MSG_GET_MMAP = nxt_port_handler_idx(get_mmap), _NXT_PORT_MSG_PROCESS_CREATED = nxt_port_handler_idx(process_created), _NXT_PORT_MSG_PROCESS_READY = nxt_port_handler_idx(process_ready), @@ -247,6 +249,11 @@ typedef struct { } nxt_port_msg_get_port_t; +typedef struct { + uint32_t id; +} nxt_port_msg_get_mmap_t; + + /* * nxt_port_data_t size is allocation size * which enables effective reuse of memory pool cache. |