summaryrefslogtreecommitdiffhomepage
path: root/src/nxt_runtime.h
diff options
context:
space:
mode:
authorHong Zhi Dao <hongzhidao@gmail.com>2019-10-29 16:07:21 +0300
committerHong Zhi Dao <hongzhidao@gmail.com>2019-10-29 16:07:21 +0300
commit5d42599e3318aa8f68a3cbb4b992985cc75495dc (patch)
treed761f378f9992bd5230748f0ea93468e01588eee /src/nxt_runtime.h
parent65b03a14a7b48ae0e1dc34b74e05f01574a5424f (diff)
downloadunit-5d42599e3318aa8f68a3cbb4b992985cc75495dc.tar.gz
unit-5d42599e3318aa8f68a3cbb4b992985cc75495dc.tar.bz2
Process port refactoring.
- Introduced nxt_runtime_process_port_create(). - Moved nxt_process_use() into nxt_process.c from nxt_runtime.c. - Renamed nxt_runtime_process_remove_pid() as nxt_runtime_process_remove(). - Some public functions transformed to static. This closes #327 issue on GitHub.
Diffstat (limited to 'src/nxt_runtime.h')
-rw-r--r--src/nxt_runtime.h10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nxt_runtime.h b/src/nxt_runtime.h
index 0791f8e7..d5b340b6 100644
--- a/src/nxt_runtime.h
+++ b/src/nxt_runtime.h
@@ -93,22 +93,20 @@ nxt_int_t nxt_runtime_thread_pool_create(nxt_thread_t *thr, nxt_runtime_t *rt,
nxt_process_t *nxt_runtime_process_new(nxt_runtime_t *rt);
-nxt_process_t *nxt_runtime_process_get(nxt_runtime_t *rt, nxt_pid_t pid);
-
void nxt_runtime_process_add(nxt_task_t *task, nxt_process_t *process);
nxt_process_t *nxt_runtime_process_find(nxt_runtime_t *rt, nxt_pid_t pid);
-void nxt_process_use(nxt_task_t *task, nxt_process_t *process, int i);
-
nxt_process_t *nxt_runtime_process_first(nxt_runtime_t *rt,
nxt_lvlhsh_each_t *lhe);
+void nxt_runtime_process_release(nxt_runtime_t *rt, nxt_process_t *process);
+
#define nxt_runtime_process_next(rt, lhe) \
nxt_lvlhsh_each(&rt->processes, lhe)
-
-void nxt_runtime_port_add(nxt_task_t *task, nxt_port_t *port);
+nxt_port_t *nxt_runtime_process_port_create(nxt_task_t *task, nxt_runtime_t *rt,
+ nxt_pid_t pid, nxt_port_id_t id, nxt_process_type_t type);
void nxt_runtime_port_remove(nxt_task_t *task, nxt_port_t *port);