diff mbox series

[v6,1/7] linux-gen: queue: encapsulate queue init/term_global functions

Message ID 1519761641-21081-2-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [v6,1/7] linux-gen: queue: encapsulate queue init/term_global functions | expand

Commit Message

Github ODP bot Feb. 27, 2018, 8 p.m. UTC
From: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>


Hide calling into queue_fn into queue_if module.

Signed-off-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org>

---
/** Email created from pull request 467 (lumag:sched-env)
 ** https://github.com/Linaro/odp/pull/467
 ** Patch: https://github.com/Linaro/odp/pull/467.patch
 ** Base sha: 3984ba4cd16a02e3fa98ccd432a06663de3fa993
 ** Merge commit sha: 62438643661dee1350bce73f90120c824538df8b
 **/
 platform/linux-generic/include/odp_internal.h |  3 +++
 platform/linux-generic/odp_init.c             |  4 ++--
 platform/linux-generic/odp_queue_if.c         | 11 +++++++++++
 3 files changed, 16 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/platform/linux-generic/include/odp_internal.h b/platform/linux-generic/include/odp_internal.h
index 444e1163b..b8d791544 100644
--- a/platform/linux-generic/include/odp_internal.h
+++ b/platform/linux-generic/include/odp_internal.h
@@ -100,6 +100,9 @@  int odp_pool_init_local(void);
 int odp_pool_term_global(void);
 int odp_pool_term_local(void);
 
+int _odp_queue_init_global(void);
+int _odp_queue_term_global(void);
+
 int odp_pktio_init_global(void);
 int odp_pktio_term_global(void);
 int odp_pktio_init_local(void);
diff --git a/platform/linux-generic/odp_init.c b/platform/linux-generic/odp_init.c
index a2d9d52ff..aa0885dab 100644
--- a/platform/linux-generic/odp_init.c
+++ b/platform/linux-generic/odp_init.c
@@ -90,7 +90,7 @@  int odp_init_global(odp_instance_t *instance,
 	}
 	stage = POOL_INIT;
 
-	if (queue_fn->init_global()) {
+	if (_odp_queue_init_global()) {
 		ODP_ERR("ODP queue init failed.\n");
 		goto init_failed;
 	}
@@ -238,7 +238,7 @@  int _odp_term_global(enum init_stage stage)
 		/* Fall through */
 
 	case QUEUE_INIT:
-		if (queue_fn->term_global()) {
+		if (_odp_queue_term_global()) {
 			ODP_ERR("ODP queue term failed.\n");
 			rc = -1;
 		}
diff --git a/platform/linux-generic/odp_queue_if.c b/platform/linux-generic/odp_queue_if.c
index 969b0d3cb..e1cfc9445 100644
--- a/platform/linux-generic/odp_queue_if.c
+++ b/platform/linux-generic/odp_queue_if.c
@@ -7,6 +7,7 @@ 
 #include "config.h"
 
 #include <odp_queue_if.h>
+#include <odp_internal.h>
 
 extern const queue_api_t queue_scalable_api;
 extern const queue_fn_t queue_scalable_fn;
@@ -111,3 +112,13 @@  int odp_queue_info(odp_queue_t queue, odp_queue_info_t *info)
 {
 	return queue_api->queue_info(queue, info);
 }
+
+int _odp_queue_init_global(void)
+{
+	return queue_fn->init_global();
+}
+
+int _odp_queue_term_global(void)
+{
+	return queue_fn->term_global();
+}