Lines Matching refs:hdr

32         if (mmap_handler->hdr != NULL) {  in nxt_port_mmap_handler_use()
33 nxt_mem_munmap(mmap_handler->hdr, PORT_MMAP_SIZE); in nxt_port_mmap_handler_use()
34 mmap_handler->hdr = NULL; in nxt_port_mmap_handler_use()
125 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_buf_completion() local
140 hdr = mmap_handler->hdr; in nxt_port_mmap_buf_completion()
142 if (nxt_slow_path(hdr->src_pid != nxt_pid && hdr->dst_pid != nxt_pid)) { in nxt_port_mmap_buf_completion()
144 "%PI->%PI", hdr->src_pid, hdr->dst_pid); in nxt_port_mmap_buf_completion()
155 c = nxt_port_mmap_chunk_id(hdr, p) + 1; in nxt_port_mmap_buf_completion()
156 p = nxt_port_mmap_chunk_start(hdr, c); in nxt_port_mmap_buf_completion()
160 c = nxt_port_mmap_chunk_id(hdr, p); in nxt_port_mmap_buf_completion()
167 b->is_port_mmap_sent, hdr->src_pid, hdr->dst_pid, hdr->id, c); in nxt_port_mmap_buf_completion()
170 nxt_port_mmap_set_chunk_free(hdr->free_map, c); in nxt_port_mmap_buf_completion()
176 if (hdr->dst_pid == nxt_pid in nxt_port_mmap_buf_completion()
177 && nxt_atomic_cmp_set(&hdr->oosm, 1, 0)) in nxt_port_mmap_buf_completion()
179 process = nxt_runtime_process_find(task->thread->runtime, hdr->src_pid); in nxt_port_mmap_buf_completion()
210 nxt_port_mmap_header_t *hdr; in nxt_port_incoming_port_mmap() local
233 hdr = mem; in nxt_port_incoming_port_mmap()
235 if (nxt_slow_path(hdr->src_pid != process->pid in nxt_port_incoming_port_mmap()
236 || hdr->dst_pid != nxt_pid)) in nxt_port_incoming_port_mmap()
239 "%PI != %PI or %PI != %PI", hdr->src_pid, process->pid, in nxt_port_incoming_port_mmap()
240 hdr->dst_pid, nxt_pid); in nxt_port_incoming_port_mmap()
256 mmap_handler->hdr = hdr; in nxt_port_incoming_port_mmap()
261 port_mmap = nxt_port_mmap_at(&process->incoming, hdr->id); in nxt_port_incoming_port_mmap()
276 hdr->sent_over = 0xFFFFu; in nxt_port_incoming_port_mmap()
295 nxt_port_mmap_header_t *hdr; in nxt_port_new_port_mmap() local
326 mmap_handler->hdr = mem; in nxt_port_new_port_mmap()
332 hdr = mmap_handler->hdr; in nxt_port_new_port_mmap()
334 nxt_memset(hdr->free_map, 0xFFU, sizeof(hdr->free_map)); in nxt_port_new_port_mmap()
335 nxt_memset(hdr->free_tracking_map, 0xFFU, sizeof(hdr->free_tracking_map)); in nxt_port_new_port_mmap()
337 hdr->id = mmaps->size - 1; in nxt_port_new_port_mmap()
338 hdr->src_pid = nxt_pid; in nxt_port_new_port_mmap()
339 hdr->sent_over = 0xFFFFu; in nxt_port_new_port_mmap()
342 free_map = tracking ? hdr->free_tracking_map : hdr->free_map; in nxt_port_new_port_mmap()
349 nxt_port_mmap_set_chunk_busy(hdr->free_map, PORT_MMAP_CHUNK_COUNT); in nxt_port_new_port_mmap()
350 nxt_port_mmap_set_chunk_busy(hdr->free_tracking_map, PORT_MMAP_CHUNK_COUNT); in nxt_port_new_port_mmap()
353 hdr->id, nxt_pid); in nxt_port_new_port_mmap()
452 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_get() local
464 hdr = mmap_handler->hdr; in nxt_port_mmap_get()
466 if (hdr->sent_over != 0xFFFFu) { in nxt_port_mmap_get()
472 free_map = tracking ? hdr->free_tracking_map : hdr->free_map; in nxt_port_mmap_get()
498 hdr->oosm = 1; in nxt_port_mmap_get()
549 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_get_buf() local
582 hdr = mmap_handler->hdr; in nxt_port_mmap_get_buf()
584 b->mem.start = nxt_port_mmap_chunk_start(hdr, c); in nxt_port_mmap_get_buf()
591 hdr->src_pid, hdr->dst_pid, hdr->id, c); in nxt_port_mmap_get_buf()
603 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_increase_buf() local
621 hdr = mmap_handler->hdr; in nxt_port_mmap_increase_buf()
623 start = nxt_port_mmap_chunk_id(hdr, b->mem.end); in nxt_port_mmap_increase_buf()
634 if (nxt_port_mmap_chk_set_chunk_busy(hdr->free_map, c) == 0) { in nxt_port_mmap_increase_buf()
647 nxt_port_mmap_set_chunk_free(hdr->free_map, c); in nxt_port_mmap_increase_buf()
669 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_get_incoming_buf() local
692 hdr = mmap_handler->hdr; in nxt_port_mmap_get_incoming_buf()
694 b->mem.start = nxt_port_mmap_chunk_start(hdr, mmap_msg->chunk_id); in nxt_port_mmap_get_incoming_buf()
704 hdr->src_pid, hdr->dst_pid, hdr->id, mmap_msg->chunk_id); in nxt_port_mmap_get_incoming_buf()
718 nxt_port_mmap_header_t *hdr; in nxt_port_mmap_write() local
744 hdr = mmap_handler->hdr; in nxt_port_mmap_write()
746 mmap_msg->mmap_id = hdr->id; in nxt_port_mmap_write()
747 mmap_msg->chunk_id = nxt_port_mmap_chunk_id(hdr, bmem->mem.pos); in nxt_port_mmap_write()