diff mbox

[RFC,2/4] platform: implement odp_queue_sched_prio and odp_queue_sched_group

Message ID 1418723669-10161-3-git-send-email-ciprian.barbu@linaro.org
State New
Headers show

Commit Message

Ciprian Barbu Dec. 16, 2014, 9:54 a.m. UTC
Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
---
 platform/linux-generic/odp_queue.c | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
diff mbox

Patch

diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index a7c5e42..36ca430 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -146,6 +146,30 @@  odp_schedule_sync_t odp_queue_sched_type(odp_queue_t handle)
 	return queue->s.param.sched.sync;
 }
 
+odp_schedule_prio_t odp_queue_sched_prio(odp_queue_t handle)
+{
+	queue_entry_t *queue;
+
+	if (handle == ODP_QUEUE_INVALID)
+		ODP_ABORT("Ivalid queue handle\n");
+
+	queue = queue_to_qentry(handle);
+
+	return queue->s.param.sched.prio;
+}
+
+odp_schedule_group_t odp_queue_sched_group(odp_queue_t handle)
+{
+	queue_entry_t *queue;
+
+	if (handle == ODP_QUEUE_INVALID)
+		ODP_ABORT("Ivalid queue handle\n");
+
+	queue = queue_to_qentry(handle);
+
+	return queue->s.param.sched.group;
+}
+
 odp_queue_t odp_queue_create(const char *name, odp_queue_type_t type,
 			     odp_queue_param_t *param)
 {