Lines Matching refs:port_impl

1462     nxt_unit_port_impl_t          *port_impl;  in nxt_unit_request_check_response_port()  local
1472 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_request_check_response_port()
1477 if (nxt_fast_path(port_impl->ready)) { in nxt_unit_request_check_response_port()
1492 nxt_queue_insert_tail(&port_impl->awaiting_req, in nxt_unit_request_check_response_port()
1502 port_impl = nxt_unit_malloc(ctx, sizeof(nxt_unit_port_impl_t)); in nxt_unit_request_check_response_port()
1503 if (nxt_slow_path(port_impl == NULL)) { in nxt_unit_request_check_response_port()
1512 port = &port_impl->port; in nxt_unit_request_check_response_port()
1545 nxt_queue_insert_tail(&process->ports, &port_impl->link); in nxt_unit_request_check_response_port()
1547 port_impl->process = process; in nxt_unit_request_check_response_port()
1548 port_impl->queue = NULL; in nxt_unit_request_check_response_port()
1549 port_impl->from_socket = 0; in nxt_unit_request_check_response_port()
1550 port_impl->socket_rbuf = NULL; in nxt_unit_request_check_response_port()
1552 nxt_queue_init(&port_impl->awaiting_req); in nxt_unit_request_check_response_port()
1556 nxt_queue_insert_tail(&port_impl->awaiting_req, &req_impl->port_wait_link); in nxt_unit_request_check_response_port()
1558 port_impl->use_count = 2; in nxt_unit_request_check_response_port()
1559 port_impl->ready = 0; in nxt_unit_request_check_response_port()
4601 nxt_unit_port_impl_t *port_impl; in nxt_unit_read_buf() local
4610 port_impl = nxt_container_of(ctx_impl->read_port, nxt_unit_port_impl_t, in nxt_unit_read_buf()
4617 if (port_impl->from_socket == 0) { in nxt_unit_read_buf()
4621 port_impl->from_socket++; in nxt_unit_read_buf()
4626 port_impl->from_socket); in nxt_unit_read_buf()
5096 nxt_unit_port_impl_t *port_impl; in nxt_unit_ctx_alloc() local
5140 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_ctx_alloc()
5141 port_impl->queue = mem; in nxt_unit_ctx_alloc()
5369 nxt_unit_port_impl_t *port_impl; in nxt_unit_port_use() local
5371 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_port_use()
5373 nxt_atomic_fetch_add(&port_impl->use_count, 1); in nxt_unit_port_use()
5380 nxt_unit_port_impl_t *port_impl; in nxt_unit_port_release() local
5382 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_port_release()
5384 c = nxt_atomic_fetch_add(&port_impl->use_count, -1); in nxt_unit_port_release()
5391 nxt_unit_process_release(port_impl->process); in nxt_unit_port_release()
5405 if (port_impl->queue != NULL) { in nxt_unit_port_release()
5406 munmap(port_impl->queue, (port->id.id == NXT_UNIT_SHARED_PORT_ID) in nxt_unit_port_release()
5411 nxt_unit_free(NULL, port_impl); in nxt_unit_port_release()
5636 nxt_unit_port_impl_t *port_impl; in nxt_unit_remove_port() local
5643 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_remove_port()
5645 nxt_queue_remove(&port_impl->link); in nxt_unit_remove_port()
5896 nxt_unit_port_impl_t *port_impl; in nxt_unit_port_send() local
5900 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_port_send()
5901 if (port_impl->queue != NULL && (oob == NULL || oob->size == 0) in nxt_unit_port_send()
5904 rc = nxt_port_queue_send(port_impl->queue, buf, buf_size, &notify); in nxt_unit_port_send()
5943 if (port_impl->queue != NULL) { in nxt_unit_port_send()
5946 rc = nxt_port_queue_send(port_impl->queue, &msg.type, 1, &notify); in nxt_unit_port_send()
6022 nxt_unit_port_impl_t *port_impl; in nxt_unit_ctx_port_recv() local
6024 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_ctx_port_recv()
6030 if (port_impl->from_socket > 0) { in nxt_unit_ctx_port_recv()
6031 if (port_impl->socket_rbuf != NULL in nxt_unit_ctx_port_recv()
6032 && port_impl->socket_rbuf->size > 0) in nxt_unit_ctx_port_recv()
6034 port_impl->from_socket--; in nxt_unit_ctx_port_recv()
6036 nxt_unit_rbuf_cpy(rbuf, port_impl->socket_rbuf); in nxt_unit_ctx_port_recv()
6037 port_impl->socket_rbuf->size = 0; in nxt_unit_ctx_port_recv()
6051 port_impl->from_socket++; in nxt_unit_ctx_port_recv()
6055 port_impl->from_socket); in nxt_unit_ctx_port_recv()
6094 if (port_impl->from_socket > 0) { in nxt_unit_ctx_port_recv()
6095 port_impl->from_socket--; in nxt_unit_ctx_port_recv()
6104 if (port_impl->socket_rbuf == NULL) { in nxt_unit_ctx_port_recv()
6105 port_impl->socket_rbuf = nxt_unit_read_buf_get(ctx); in nxt_unit_ctx_port_recv()
6107 if (nxt_slow_path(port_impl->socket_rbuf == NULL)) { in nxt_unit_ctx_port_recv()
6111 port_impl->socket_rbuf->size = 0; in nxt_unit_ctx_port_recv()
6114 if (port_impl->socket_rbuf->size > 0) { in nxt_unit_ctx_port_recv()
6120 nxt_unit_rbuf_cpy(port_impl->socket_rbuf, rbuf); in nxt_unit_ctx_port_recv()
6143 nxt_unit_port_impl_t *port_impl; in nxt_unit_shared_port_recv() local
6145 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_shared_port_recv()
6162 nxt_app_queue_notification_received(port_impl->queue); in nxt_unit_shared_port_recv()
6242 nxt_unit_port_impl_t *port_impl; in nxt_unit_port_queue_recv() local
6244 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_port_queue_recv()
6246 rbuf->size = nxt_port_queue_recv(port_impl->queue, rbuf->buf); in nxt_unit_port_queue_recv()
6260 nxt_unit_port_impl_t *port_impl; in nxt_unit_app_queue_recv() local
6267 port_impl = nxt_container_of(port, nxt_unit_port_impl_t, port); in nxt_unit_app_queue_recv()
6268 queue = port_impl->queue; in nxt_unit_app_queue_recv()