nxt_process.c (1252:a2d7ea9069ea) nxt_process.c (1254:aae6699f4eee)
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_main_process.h>

--- 770 unchanged lines hidden (view full) ---

779 return NXT_ERROR;
780 }
781
782 return NXT_OK;
783}
784
785
786void
1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) NGINX, Inc.
5 */
6
7#include <nxt_main.h>
8#include <nxt_main_process.h>

--- 770 unchanged lines hidden (view full) ---

779 return NXT_ERROR;
780 }
781
782 return NXT_OK;
783}
784
785
786void
787nxt_process_use(nxt_task_t *task, nxt_process_t *process, int i)
788{
789 process->use_count += i;
790
791 if (process->use_count == 0) {
792 nxt_runtime_process_release(task->thread->runtime, process);
793 }
794}
795
796
797void
787nxt_process_port_add(nxt_task_t *task, nxt_process_t *process, nxt_port_t *port)
788{
789 nxt_assert(port->process == NULL);
790
791 port->process = process;
792 nxt_queue_insert_tail(&process->ports, &port->link);
793
794 nxt_process_use(task, process, 1);

--- 62 unchanged lines hidden ---
798nxt_process_port_add(nxt_task_t *task, nxt_process_t *process, nxt_port_t *port)
799{
800 nxt_assert(port->process == NULL);
801
802 port->process = process;
803 nxt_queue_insert_tail(&process->ports, &port->link);
804
805 nxt_process_use(task, process, 1);

--- 62 unchanged lines hidden ---