summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_buf.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/nxt_buf.h26
1 files changed, 21 insertions, 5 deletions
diff --git a/src/nxt_buf.h b/src/nxt_buf.h
index 85ab3602..c5ac5c20 100644
--- a/src/nxt_buf.h
+++ b/src/nxt_buf.h
@@ -67,7 +67,7 @@ typedef struct {
struct nxt_buf_s {
void *data;
nxt_work_handler_t completion_handler;
- nxt_buf_t *parent;
+ void *parent;
/*
* The next link, flags, and nxt_buf_mem_t should
@@ -85,11 +85,13 @@ struct nxt_buf_s {
uint8_t is_file; /* 1 bit */
uint16_t is_mmap:1;
+ uint16_t is_port_mmap:1;
uint16_t is_sync:1;
uint16_t is_nobuf:1;
uint16_t is_flush:1;
uint16_t is_last:1;
+ uint16_t is_port_mmap_sent:1;
nxt_buf_mem_t mem;
@@ -103,10 +105,11 @@ struct nxt_buf_s {
};
-#define NXT_BUF_MEM_SIZE offsetof(nxt_buf_t, file)
-#define NXT_BUF_SYNC_SIZE NXT_BUF_MEM_SIZE
-#define NXT_BUF_MMAP_SIZE sizeof(nxt_buf_t)
-#define NXT_BUF_FILE_SIZE sizeof(nxt_buf_t)
+#define NXT_BUF_MEM_SIZE offsetof(nxt_buf_t, file)
+#define NXT_BUF_SYNC_SIZE NXT_BUF_MEM_SIZE
+#define NXT_BUF_FILE_SIZE sizeof(nxt_buf_t)
+#define NXT_BUF_MMAP_SIZE NXT_BUF_FILE_SIZE
+#define NXT_BUF_PORT_MMAP_SIZE NXT_BUF_MEM_SIZE
#define NXT_BUF_SYNC_NOBUF 1
@@ -146,6 +149,19 @@ nxt_buf_clear_mmap(b) \
#define \
+nxt_buf_is_port_mmap(b) \
+ ((b)->is_port_mmap)
+
+#define \
+nxt_buf_set_port_mmap(b) \
+ (b)->is_port_mmap = 1
+
+#define \
+nxt_buf_clear_port_mmap(b) \
+ (b)->is_port_mmap = 0
+
+
+#define \
nxt_buf_is_sync(b) \
((b)->is_sync)