summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_port_memory_int.h
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2019-12-24 18:04:13 +0300
committerMax Romanov <max.romanov@nginx.com>2019-12-24 18:04:13 +0300
commitdf7caf465072e171f88358b9e69c65b76d8efd25 (patch)
tree44e0ac59ad98860c0ad7f6bb728ba914ca15f7f1 /src/nxt_port_memory_int.h
parent64f649f9903e226421869376bc72a8513581d7d0 (diff)
downloadunit-df7caf465072e171f88358b9e69c65b76d8efd25.tar.gz
unit-df7caf465072e171f88358b9e69c65b76d8efd25.tar.bz2
Introducing port messages to notify about out of shared memory.
- OOSM (out of shared memory). Sent by application process to router when application reaches the limit of allocated shared memory and needs more. - SHM_ACK. Sent by router to application when the application's shared memory is released and the OOSM flag is enabled for the segment. This implements blocking mode (the library waits for SHM_ACK in case of out of shared memory condition and retries allocating the required memory amount) and non-blocking mode (the library notifies the application that it's out of shared memory and returns control to the application module that sets up the output queue and puts SHM_ACK in the main message loop).
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 53dfaebf..87c3d833 100644
--- a/src/nxt_port_memory_int.h
+++ b/src/nxt_port_memory_int.h
@@ -51,6 +51,7 @@ struct nxt_port_mmap_header_s {
nxt_pid_t src_pid; /* For sanity check. */
nxt_pid_t dst_pid; /* For sanity check. */
nxt_port_id_t sent_over;
+ nxt_atomic_t oosm;
nxt_free_map_t free_map[MAX_FREE_IDX];
nxt_free_map_t free_map_padding;
nxt_free_map_t free_tracking_map[MAX_FREE_IDX];