Lines Matching refs:hdr

125     nxt_port_mmap_header_t **hdr, nxt_unit_read_buf_t *rbuf);
130 nxt_port_mmap_header_t *hdr, void *start, uint32_t size);
212 nxt_port_mmap_header_t *hdr; member
334 nxt_port_mmap_header_t *hdr; member
2459 mmap_buf->hdr = NULL; in nxt_unit_mmap_buf_get()
2628 nxt_port_mmap_header_t *hdr; in nxt_unit_mmap_buf_send() local
2635 hdr = mmap_buf->hdr; in nxt_unit_mmap_buf_send()
2644 m.msg.mmap = hdr != NULL && m.mmap_msg.size > 0; in nxt_unit_mmap_buf_send()
2651 m.mmap_msg.mmap_id = hdr->id; in nxt_unit_mmap_buf_send()
2652 m.mmap_msg.chunk_id = nxt_port_mmap_chunk_id(hdr, in nxt_unit_mmap_buf_send()
2668 first_free_chunk = nxt_port_mmap_chunk_id(hdr, last_used) + 1; in nxt_unit_mmap_buf_send()
2671 first_free = nxt_port_mmap_chunk_start(hdr, first_free_chunk); in nxt_unit_mmap_buf_send()
2685 mmap_buf->hdr = NULL; in nxt_unit_mmap_buf_send()
2750 if (mmap_buf->hdr != NULL) { in nxt_unit_free_outgoing_buf()
2752 mmap_buf->hdr, mmap_buf->buf.start, in nxt_unit_free_outgoing_buf()
2755 mmap_buf->hdr = NULL; in nxt_unit_free_outgoing_buf()
3168 mmap_buf->hdr = NULL; in nxt_unit_request_preread()
3435 if (ws_impl->buf->free_ptr != NULL || ws_impl->buf->hdr != NULL) { in nxt_unit_websocket_retain()
3484 nxt_port_mmap_header_t *hdr; in nxt_unit_mmap_get() local
3497 hdr = mm->hdr; in nxt_unit_mmap_get()
3499 if (hdr->sent_over != 0xFFFFu in nxt_unit_mmap_get()
3500 && (hdr->sent_over != port->id.id in nxt_unit_mmap_get()
3508 while (nxt_port_mmap_get_free_chunk(hdr->free_map, c)) { in nxt_unit_mmap_get()
3512 res = nxt_port_mmap_chk_set_chunk_busy(hdr->free_map, in nxt_unit_mmap_get()
3523 nxt_port_mmap_set_chunk_free(hdr->free_map, *c + i); in nxt_unit_mmap_get()
3541 hdr->oosm = 1; in nxt_unit_mmap_get()
3587 hdr = nxt_unit_new_mmap(ctx, port, *n); in nxt_unit_mmap_get()
3598 return hdr; in nxt_unit_mmap_get()
3714 e->hdr = NULL; in nxt_unit_mmap_at()
3736 nxt_port_mmap_header_t *hdr; in nxt_unit_new_mmap() local
3762 mm->hdr = mem; in nxt_unit_new_mmap()
3763 hdr = mem; in nxt_unit_new_mmap()
3765 memset(hdr->free_map, 0xFFU, sizeof(hdr->free_map)); in nxt_unit_new_mmap()
3766 memset(hdr->free_tracking_map, 0xFFU, sizeof(hdr->free_tracking_map)); in nxt_unit_new_mmap()
3768 hdr->id = lib->outgoing.size - 1; in nxt_unit_new_mmap()
3769 hdr->src_pid = lib->pid; in nxt_unit_new_mmap()
3770 hdr->dst_pid = port->id.pid; in nxt_unit_new_mmap()
3771 hdr->sent_over = port->id.id; in nxt_unit_new_mmap()
3776 nxt_port_mmap_set_chunk_busy(hdr->free_map, i); in nxt_unit_new_mmap()
3780 nxt_port_mmap_set_chunk_busy(hdr->free_map, PORT_MMAP_CHUNK_COUNT); in nxt_unit_new_mmap()
3781 nxt_port_mmap_set_chunk_busy(hdr->free_tracking_map, PORT_MMAP_CHUNK_COUNT); in nxt_unit_new_mmap()
3788 hdr = NULL; in nxt_unit_new_mmap()
3792 hdr->id, (int) lib->pid, (int) port->id.pid); in nxt_unit_new_mmap()
3799 if (nxt_fast_path(hdr != NULL)) { in nxt_unit_new_mmap()
3800 return hdr; in nxt_unit_new_mmap()
3922 nxt_port_mmap_header_t *hdr; in nxt_unit_get_outgoing_buf() local
3939 mmap_buf->hdr = NULL; in nxt_unit_get_outgoing_buf()
3953 hdr = nxt_unit_mmap_get(ctx, port, &c, &nchunks, min_nchunks); in nxt_unit_get_outgoing_buf()
3954 if (nxt_slow_path(hdr == NULL)) { in nxt_unit_get_outgoing_buf()
3956 mmap_buf->hdr = NULL; in nxt_unit_get_outgoing_buf()
3968 mmap_buf->hdr = hdr; in nxt_unit_get_outgoing_buf()
3969 mmap_buf->buf.start = (char *) nxt_port_mmap_chunk_start(hdr, c); in nxt_unit_get_outgoing_buf()
3976 (int) hdr->id, (int) c, in nxt_unit_get_outgoing_buf()
3994 nxt_port_mmap_header_t *hdr; in nxt_unit_incoming_mmap() local
4016 hdr = mem; in nxt_unit_incoming_mmap()
4018 if (nxt_slow_path(hdr->src_pid != pid)) { in nxt_unit_incoming_mmap()
4021 "detected: %d != %d or %d != %d", (int) hdr->src_pid, in nxt_unit_incoming_mmap()
4022 (int) pid, (int) hdr->dst_pid, (int) lib->pid); in nxt_unit_incoming_mmap()
4033 mm = nxt_unit_mmap_at(&lib->incoming, hdr->id); in nxt_unit_incoming_mmap()
4042 mm->hdr = hdr; in nxt_unit_incoming_mmap()
4044 hdr->sent_over = 0xFFFFu; in nxt_unit_incoming_mmap()
4143 munmap(mm->hdr, PORT_MMAP_SIZE); in nxt_unit_mmaps_destroy()
4155 pid_t pid, uint32_t id, nxt_port_mmap_header_t **hdr, in nxt_unit_check_rbuf_mmap() argument
4168 *hdr = NULL; in nxt_unit_check_rbuf_mmap()
4173 *hdr = mm->hdr; in nxt_unit_check_rbuf_mmap()
4175 if (nxt_fast_path(*hdr != NULL)) { in nxt_unit_check_rbuf_mmap()
4211 nxt_port_mmap_header_t *hdr; in nxt_unit_mmap_read() local
4255 &hdr, rbuf); in nxt_unit_mmap_read()
4265 start = nxt_port_mmap_chunk_start(hdr, mmap_msg->chunk_id); in nxt_unit_mmap_read()
4276 b->hdr = hdr; in nxt_unit_mmap_read()
4283 (int) hdr->src_pid, (int) hdr->dst_pid, in nxt_unit_mmap_read()
4284 (int) hdr->id, (int) mmap_msg->chunk_id, in nxt_unit_mmap_read()
4329 nxt_unit_mmap_release(nxt_unit_ctx_t *ctx, nxt_port_mmap_header_t *hdr, in nxt_unit_mmap_release() argument
4341 c = nxt_port_mmap_chunk_id(hdr, p); in nxt_unit_mmap_release()
4345 nxt_port_mmap_set_chunk_free(hdr->free_map, c); in nxt_unit_mmap_release()
4354 if (hdr->src_pid == lib->pid && freed_chunks != 0) { in nxt_unit_mmap_release()
4361 if (hdr->dst_pid == lib->pid in nxt_unit_mmap_release()
4363 && nxt_atomic_cmp_set(&hdr->oosm, 1, 0)) in nxt_unit_mmap_release()
4365 nxt_unit_send_shm_ack(ctx, hdr->src_pid); in nxt_unit_mmap_release()