diff mbox series

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

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

Commit Message

Github ODP bot Feb. 20, 2018, 1 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: d5419e8857b2bc61d3be17fe53f171550fee426b
 ** Merge commit sha: e771b2cf674da116ae0cb9e7e5dca276e31fa112
 **/
 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 f85a2f538..e36b084f1 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 0c5adf335..3900fb629 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();
+}