@@ -21,18 +21,18 @@ extern "C" {
#include <odp_std_types.h>
#include <odp_buffer.h>
-
+#include <plat/odp_queue.h>
/**
* ODP queue
*/
-typedef uint32_t odp_queue_t;
+typedef plat_odp_queue_t odp_queue_t;
/** Invalid queue */
-#define ODP_QUEUE_INVALID 0
+#define ODP_QUEUE_INVALID PLAT_ODP_QUEUE_INVALID
/** Maximum queue name lenght in chars */
-#define ODP_QUEUE_NAME_LEN 32
+#define ODP_QUEUE_NAME_LEN PLAT_ODP_QUEUE_NAME_LEN
/**
@@ -51,20 +51,21 @@ typedef int odp_queue_type_t;
typedef int odp_schedule_prio_t;
/** Highest scheduling priority */
-#define ODP_SCHED_PRIO_HIGHEST 0
+#define ODP_SCHED_PRIO_HIGHEST PLAT_ODP_SCHED_PRIO_HIGHEST
/** Normal scheduling priority */
-#define ODP_SCHED_PRIO_NORMAL (ODP_CONFIG_SCHED_PRIOS / 2)
+#define ODP_SCHED_PRIO_NORMAL PLAT_ODP_SCHED_PRIO_NORMAL
/** Lowest scheduling priority */
-#define ODP_SCHED_PRIO_LOWEST (ODP_CONFIG_SCHED_PRIOS - 1)
+#define ODP_SCHED_PRIO_LOWEST PLAT_ODP_SCHED_PRIO_LOWEST
/** Default scheduling priority */
-#define ODP_SCHED_PRIO_DEFAULT ODP_SCHED_PRIO_NORMAL
+#define ODP_SCHED_PRIO_DEFAULT PLAT_ODP_SCHED_PRIO_NORMAL
/**
* ODP schedule synchronisation
+ * TODO: Can sync type values be platform specific?
*/
typedef int odp_schedule_sync_t;
@@ -73,7 +74,7 @@ typedef int odp_schedule_sync_t;
#define ODP_SCHED_SYNC_ORDERED 2 /**< Ordered queue */
/** Default queue synchronisation */
-#define ODP_SCHED_SYNC_DEFAULT ODP_SCHED_SYNC_ATOMIC
+#define ODP_SCHED_SYNC_DEFAULT PLAT_ODP_SCHED_SYNC_DEFAULT
/**
* ODP schedule core group
@@ -84,7 +85,7 @@ typedef int odp_schedule_group_t;
#define ODP_SCHED_GROUP_ALL 0
/** Default core group */
-#define ODP_SCHED_GROUP_DEFAULT ODP_SCHED_GROUP_ALL
+#define ODP_SCHED_GROUP_DEFAULT PLAT_ODP_SCHED_GROUP_DEFAULT
/**
new file mode 100644
@@ -0,0 +1,50 @@
+/* Copyright (c) 2013, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+
+/**
+ * @file
+ *
+ * ODP queue
+ */
+
+#ifndef ODP_QUEUE_H_
+#error This file should be included only into corresponding top level header
+#else
+
+#include <odp_std_types.h>
+
+/**
+ * ODP queue
+ */
+typedef uint32_t plat_odp_queue_t;
+
+/** Invalid queue */
+#define PLAT_ODP_QUEUE_INVALID 0
+
+/** Maximum queue name lenght in chars */
+#define PLAT_ODP_QUEUE_NAME_LEN 32
+
+
+/** Highest scheduling priority */
+#define PLAT_ODP_SCHED_PRIO_HIGHEST 0
+
+/** Normal scheduling priority */
+#define PLAT_ODP_SCHED_PRIO_NORMAL (ODP_CONFIG_SCHED_PRIOS / 2)
+
+/** Lowest scheduling priority */
+#define PLAT_ODP_SCHED_PRIO_LOWEST (ODP_CONFIG_SCHED_PRIOS - 1)
+
+/** Default scheduling priority */
+#define PLAT_ODP_SCHED_PRIO_DEFAULT PLAT_ODP_SCHED_PRIO_NORMAL
+
+/** Default queue synchronisation */
+#define PLAT_ODP_SCHED_SYNC_DEFAULT ODP_SCHED_SYNC_ATOMIC
+
+/** Default core group */
+#define PLAT_ODP_SCHED_GROUP_DEFAULT ODP_SCHED_GROUP_ALL
+
+#endif
Signed-off-by: Taras Kondratiuk <taras.kondratiuk@linaro.org> --- include/odp_queue.h | 21 +++++----- platform/linux-generic/include/plat/odp_queue.h | 50 +++++++++++++++++++++++ 2 files changed, 61 insertions(+), 10 deletions(-) create mode 100644 platform/linux-generic/include/plat/odp_queue.h