1
2/*
3 * Copyright (C) Igor Sysoev
4 * Copyright (C) Valentin V. Bartenev
5 * Copyright (C) NGINX, Inc.
6 */
7
8#include <nxt_main.h>

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

1384
1385 return process;
1386}
1387
1388
1389void
1390nxt_runtime_process_release(nxt_runtime_t *rt, nxt_process_t *process)
1391{
1392 nxt_port_t *port;
1393
1392 if (process->registered == 1) {
1393 nxt_runtime_process_remove(rt, process);
1394 }
1395
1396 nxt_assert(process->use_count == 0);
1397 nxt_assert(process->registered == 0);
1398
1399 nxt_port_mmaps_destroy(&process->incoming, 1);
1400 nxt_port_mmaps_destroy(&process->outgoing, 1);
1401
1404 do {
1405 port = nxt_port_hash_retrieve(&process->connected_ports);
1406
1407 } while (port != NULL);
1408
1402 nxt_thread_mutex_destroy(&process->incoming.mutex);
1403 nxt_thread_mutex_destroy(&process->outgoing.mutex);
1404 nxt_thread_mutex_destroy(&process->cp_mutex);
1405
1406 /* processes from nxt_runtime_process_get() have no memory pool */
1407 if (process->mem_pool != NULL) {
1408 nxt_mp_destroy(process->mem_pool);
1409 }

--- 296 unchanged lines hidden ---