Lines Matching refs:pid

115 static int nxt_unit_incoming_mmap(nxt_unit_ctx_t *ctx, pid_t pid, int fd);
124 nxt_unit_mmaps_t *mmaps, pid_t pid, uint32_t id,
128 static int nxt_unit_get_mmap(nxt_unit_ctx_t *ctx, pid_t pid, uint32_t id);
131 static int nxt_unit_send_shm_ack(nxt_unit_ctx_t *ctx, pid_t pid);
133 static nxt_unit_process_t *nxt_unit_process_get(nxt_unit_ctx_t *ctx, pid_t pid);
135 pid_t pid, int remove);
164 static void nxt_unit_remove_pid(nxt_unit_impl_t *lib, pid_t pid);
199 static char * nxt_unit_snprint_prefix(char *p, const char *end, pid_t pid,
222 nxt_pid_t pid; member
375 pid_t pid; member
404 pid_t pid; member
418 int32_t pid; member
448 if (init->ready_port.id.pid != 0 in nxt_unit_init()
450 && init->read_port.id.pid != 0) in nxt_unit_init()
458 nxt_unit_port_id_init(&ready_port.id, ready_port.id.pid, in nxt_unit_init()
460 nxt_unit_port_id_init(&router_port.id, router_port.id.pid, in nxt_unit_init()
462 nxt_unit_port_id_init(&read_port.id, read_port.id.pid, in nxt_unit_init()
486 lib->pid = read_port.id.pid; in nxt_unit_init()
487 nxt_unit_pid = lib->pid; in nxt_unit_init()
536 nxt_unit_port_id_init(&shared_port.id, read_port.id.pid, in nxt_unit_init()
939 msg.pid = lib->pid; in nxt_unit_ready()
963 pid_t pid; in nxt_unit_process_msg() local
1004 recv_msg.pid = port_msg->pid; in nxt_unit_process_msg()
1095 rc = nxt_unit_incoming_mmap(ctx, port_msg->pid, recv_msg.fd[0]); in nxt_unit_process_msg()
1111 if (nxt_slow_path(recv_msg.size != sizeof(pid))) { in nxt_unit_process_msg()
1114 (int) sizeof(pid)); in nxt_unit_process_msg()
1120 memcpy(&pid, recv_msg.start, sizeof(pid)); in nxt_unit_process_msg()
1123 port_msg->stream, (int) pid); in nxt_unit_process_msg()
1125 nxt_unit_remove_pid(lib, pid); in nxt_unit_process_msg()
1192 recv_msg->stream, (int) new_port_msg->pid, in nxt_unit_process_new_port()
1199 nxt_unit_port_id_init(&new_port.id, new_port_msg->pid, new_port_msg->id); in nxt_unit_process_new_port()
1349 nxt_unit_port_id_init(&port_id, recv_msg->pid, recv_msg->reply_port); in nxt_unit_process_req_headers()
1481 (int) port->id.pid, (int) port->id.id); in nxt_unit_request_check_response_port()
1488 (int) port->id.pid, (int) port->id.id); in nxt_unit_request_check_response_port()
1522 port->id.pid, port->id.id); in nxt_unit_request_check_response_port()
1531 process = nxt_unit_process_find(lib, port_id->pid, 0); in nxt_unit_request_check_response_port()
1534 port->id.pid); in nxt_unit_request_check_response_port()
1592 msg.pid = lib->pid; in nxt_unit_send_req_headers_ack()
2640 m.msg.pid = lib->pid; in nxt_unit_mmap_buf_send()
3289 msg.pid = lib->pid; in nxt_unit_request_done()
3612 msg.pid = lib->pid; in nxt_unit_send_oosm()
3769 hdr->src_pid = lib->pid; in nxt_unit_new_mmap()
3770 hdr->dst_pid = port->id.pid; in nxt_unit_new_mmap()
3792 hdr->id, (int) lib->pid, (int) port->id.pid); in nxt_unit_new_mmap()
3822 lib->pid, (void *) (uintptr_t) pthread_self()); in nxt_unit_shm_open()
3896 msg.pid = lib->pid; in nxt_unit_send_mmap()
3984 nxt_unit_incoming_mmap(nxt_unit_ctx_t *ctx, pid_t pid, int fd) in nxt_unit_incoming_mmap() argument
3998 nxt_unit_debug(ctx, "incoming_mmap: fd %d from process %d", fd, (int) pid); in nxt_unit_incoming_mmap()
4018 if (nxt_slow_path(hdr->src_pid != pid)) { in nxt_unit_incoming_mmap()
4022 (int) pid, (int) hdr->dst_pid, (int) lib->pid); in nxt_unit_incoming_mmap()
4127 nxt_unit_debug(NULL, "destroy process #%d", (int) process->pid); in nxt_unit_process_release()
4155 pid_t pid, uint32_t id, nxt_port_mmap_header_t **hdr, in nxt_unit_check_rbuf_mmap() argument
4190 res = nxt_unit_get_mmap(ctx, pid, id); in nxt_unit_check_rbuf_mmap()
4254 recv_msg->pid, mmap_msg->mmap_id, in nxt_unit_mmap_read()
4295 nxt_unit_get_mmap(nxt_unit_ctx_t *ctx, pid_t pid, uint32_t id) in nxt_unit_get_mmap() argument
4311 m.msg.pid = lib->pid; in nxt_unit_get_mmap()
4317 nxt_unit_debug(ctx, "get_mmap: %d %d", (int) pid, (int) id); in nxt_unit_get_mmap()
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()
4371 nxt_unit_send_shm_ack(nxt_unit_ctx_t *ctx, pid_t pid) in nxt_unit_send_shm_ack() argument
4380 msg.pid = lib->pid; in nxt_unit_send_shm_ack()
4405 && *(pid_t *) lhq->key.start == process->pid) in nxt_unit_lvlhsh_pid_test()
4423 nxt_unit_process_lhq_pid(nxt_lvlhsh_query_t *lhq, pid_t *pid) in nxt_unit_process_lhq_pid() argument
4425 lhq->key_hash = nxt_murmur_hash2(pid, sizeof(*pid)); in nxt_unit_process_lhq_pid()
4426 lhq->key.length = sizeof(*pid); in nxt_unit_process_lhq_pid()
4427 lhq->key.start = (u_char *) pid; in nxt_unit_process_lhq_pid()
4433 nxt_unit_process_get(nxt_unit_ctx_t *ctx, pid_t pid) in nxt_unit_process_get() argument
4441 nxt_unit_process_lhq_pid(&lhq, &pid); in nxt_unit_process_get()
4452 nxt_unit_alert(ctx, "failed to allocate process for #%d", (int) pid); in nxt_unit_process_get()
4457 process->pid = pid; in nxt_unit_process_get()
4473 nxt_unit_alert(ctx, "process %d insert failed", (int) pid); in nxt_unit_process_get()
4485 nxt_unit_process_find(nxt_unit_impl_t *lib, pid_t pid, int remove) in nxt_unit_process_find() argument
4490 nxt_unit_process_lhq_pid(&lhq, &pid); in nxt_unit_process_find()
4624 (int) ctx_impl->read_port->id.pid, in nxt_unit_read_buf()
4630 (int) ctx_impl->read_port->id.pid, in nxt_unit_read_buf()
5244 nxt_unit_port_id_init(nxt_unit_port_id_t *port_id, pid_t pid, uint16_t id) in nxt_unit_port_id_init() argument
5248 port_hash_id.pid = pid; in nxt_unit_port_id_init()
5251 port_id->pid = pid; in nxt_unit_port_id_init()
5298 process = nxt_unit_process_get(ctx, lib->pid); in nxt_unit_create_port()
5308 nxt_unit_port_id_init(&new_port.id, lib->pid, process->next_port_id++); in nxt_unit_create_port()
5345 m.msg.pid = lib->pid; in nxt_unit_send_port()
5354 m.new_port.pid = port->id.pid; in nxt_unit_send_port()
5388 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_release()
5435 port->id.pid, port->id.id, in nxt_unit_add_port()
5514 port->id.pid, port->id.id, in nxt_unit_add_port()
5517 process = nxt_unit_process_get(ctx, port->id.pid); in nxt_unit_add_port()
5531 port->id.pid, port->id.id); in nxt_unit_add_port()
5541 port->id.pid, port->id.id); in nxt_unit_add_port()
5668 (int) port_id->pid, (int) port_id->id); in nxt_unit_remove_port_unsafe()
5674 (int) port_id->pid, (int) port_id->id, in nxt_unit_remove_port_unsafe()
5682 nxt_unit_remove_pid(nxt_unit_impl_t *lib, pid_t pid) in nxt_unit_remove_pid() argument
5688 process = nxt_unit_process_find(lib, pid, 1); in nxt_unit_remove_pid()
5690 nxt_unit_debug(NULL, "remove_pid: process %d not found", (int) pid); in nxt_unit_remove_pid()
5700 lib->callbacks.remove_pid(&lib->unit, pid); in nxt_unit_remove_pid()
5827 m.msg.pid = lib->pid; in nxt_unit_quit()
5868 m.msg.pid = lib->pid; in nxt_unit_get_port()
5873 m.get_port.pid = port_id->pid; in nxt_unit_get_port()
5875 nxt_unit_debug(ctx, "get_port: %d %d", (int) port_id->pid, in nxt_unit_get_port()
5907 (int) port->id.pid, (int) port->id.id); in nxt_unit_port_send()
5913 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_send()
5926 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_send()
5934 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_send()
5949 (int) port->id.pid, (int) port->id.id); in nxt_unit_port_send()
5955 (int) port->id.pid, (int) port->id.id, notify); in nxt_unit_port_send()
5964 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_send()
5971 (int) port->id.pid, (int) port->id.id, in nxt_unit_port_send()
6040 (int) port->id.pid, (int) port->id.id, in nxt_unit_ctx_port_recv()
6054 (int) port->id.pid, (int) port->id.id, in nxt_unit_ctx_port_recv()
6061 (int) port->id.pid, (int) port->id.id, in nxt_unit_ctx_port_recv()
6081 (int) port->id.pid, (int) port->id.id, (int) rbuf->size); in nxt_unit_ctx_port_recv()
6087 (int) port->id.pid, (int) port->id.id, in nxt_unit_ctx_port_recv()
6101 (int) port->id.pid, (int) port->id.id, in nxt_unit_ctx_port_recv()
6165 (int) port->id.pid, (int) port->id.id, (int) rbuf->size); in nxt_unit_shared_port_recv()
6194 (int) port->id.pid, (int) port->id.id, (int) rbuf->size); in nxt_unit_port_recv()
6290 m.msg.pid = lib->pid; in nxt_unit_app_queue_recv()
6358 && port_id->pid == port->id.pid in nxt_unit_port_hash_test()
6381 port_hash_id->pid = port_id->pid; in nxt_unit_port_hash_lhq()
6393 (int) port_id->pid, (int) port_id->id, in nxt_unit_port_hash_lhq()
6569 pid_t pid; in nxt_unit_log() local
6576 pid = lib->pid; in nxt_unit_log()
6580 pid = nxt_unit_pid; in nxt_unit_log()
6587 p = nxt_unit_snprint_prefix(p, end, pid, level); in nxt_unit_log()
6612 pid_t pid; in nxt_unit_req_log() local
6620 pid = lib->pid; in nxt_unit_req_log()
6624 pid = nxt_unit_pid; in nxt_unit_req_log()
6631 p = nxt_unit_snprint_prefix(p, end, pid, level); in nxt_unit_req_log()
6668 nxt_unit_snprint_prefix(char *p, const char *end, pid_t pid, int level) in nxt_unit_snprint_prefix() argument
6696 (int) pid, in nxt_unit_snprint_prefix()