From a432feda3e08ca9f559322e61e786ea464178c11 Mon Sep 17 00:00:00 2001 From: Laurent <laurent.thomas@open-cells.com> Date: Wed, 23 Dec 2020 14:29:40 +0100 Subject: [PATCH] add external visibility for itti_create_queue --- common/utils/ocp_itti/intertask_interface.cpp | 3 ++- common/utils/ocp_itti/intertask_interface.h | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/common/utils/ocp_itti/intertask_interface.cpp b/common/utils/ocp_itti/intertask_interface.cpp index d66ea027c99..a1455577d32 100644 --- a/common/utils/ocp_itti/intertask_interface.cpp +++ b/common/utils/ocp_itti/intertask_interface.cpp @@ -336,7 +336,7 @@ extern "C" { usleep(100*1000); // Allow the tasks to receive the message before going returning to main thread } - void itti_create_queue(const task_info_t *task_info) { + int itti_create_queue(const task_info_t *task_info) { pthread_mutex_lock (&lock_nb_queues); int newQueue=nb_queues; nb_queues++; @@ -351,6 +351,7 @@ extern "C" { if (tasks[newQueue].admin.threadFunc != NULL) itti_create_task((task_id_t)newQueue, tasks[newQueue].admin.threadFunc, NULL); + return newQueue; } int itti_init(task_id_t task_max, diff --git a/common/utils/ocp_itti/intertask_interface.h b/common/utils/ocp_itti/intertask_interface.h index 53d76b7a771..beec7678293 100644 --- a/common/utils/ocp_itti/intertask_interface.h +++ b/common/utils/ocp_itti/intertask_interface.h @@ -501,6 +501,8 @@ int itti_create_task(task_id_t task_id, void *(*start_routine) (void *), void *args_p); +int itti_create_queue(const task_info_t *task_info); + /** \brief Exit the current task. **/ void itti_exit_task(void); -- GitLab