From 6a64533fa3b96bb64bfde4615e40376d65a292cb Mon Sep 17 00:00:00 2001 From: Max Romanov Date: Wed, 4 Oct 2017 14:58:47 +0300 Subject: Introducing use counters for port and app. Thread safe port write. Use counter helps to simplify logic around port and application free. Port 'post' function introduced to simplify post execution of particular function to original port engine's thread. Write message queue is protected by mutex which makes port write operation thread safe. --- src/nxt_runtime.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/nxt_runtime.h') diff --git a/src/nxt_runtime.h b/src/nxt_runtime.h index d0decfd2..5aa897dc 100644 --- a/src/nxt_runtime.h +++ b/src/nxt_runtime.h @@ -102,11 +102,11 @@ 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_runtime_t *rt, nxt_process_t *process); +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_runtime_process_remove(nxt_runtime_t *rt, nxt_process_t *process); +void nxt_runtime_process_remove(nxt_task_t *task, nxt_process_t *process); nxt_process_t *nxt_runtime_process_first(nxt_runtime_t *rt, nxt_lvlhsh_each_t *lhe); @@ -115,9 +115,9 @@ nxt_process_t *nxt_runtime_process_first(nxt_runtime_t *rt, nxt_lvlhsh_each(&rt->processes, lhe) -void nxt_runtime_port_add(nxt_runtime_t *rt, nxt_port_t *port); +void nxt_runtime_port_add(nxt_task_t *task, nxt_port_t *port); -void nxt_runtime_port_remove(nxt_runtime_t *rt, nxt_port_t *port); +void nxt_runtime_port_remove(nxt_task_t *task, nxt_port_t *port); nxt_port_t *nxt_runtime_port_find(nxt_runtime_t *rt, nxt_pid_t pid, nxt_port_id_t port_id); -- cgit