diff mbox series

[API-NEXT,v2,2/3] linux-gen: queue: fill blocking capa

Message ID 1512039613-7090-3-git-send-email-odpbot@yandex.ru
State New
Headers show
Series [API-NEXT,v2,1/3] api: queue: non-blocking level parameter | expand

Commit Message

Github ODP bot Nov. 30, 2017, 11 a.m. UTC
From: Petri Savolainen <petri.savolainen@linaro.org>


Currently, only blocking queues are implemented.

Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org>

---
/** Email created from pull request 302 (psavol:next-lockfree-queue)
 ** https://github.com/Linaro/odp/pull/302
 ** Patch: https://github.com/Linaro/odp/pull/302.patch
 ** Base sha: 4cb02e1caccb9179575e95448fd46979e17d0905
 ** Merge commit sha: 2fb581ec76ff776f788da097894cb3f6b63ae23d
 **/
 platform/linux-generic/odp_queue.c          | 3 +++
 platform/linux-generic/odp_queue_scalable.c | 3 +++
 2 files changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 3f355e695..58103930c 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -150,7 +150,9 @@  static int queue_capability(odp_queue_capability_t *capa)
 	capa->max_sched_groups  = sched_fn->num_grps();
 	capa->sched_prios       = odp_schedule_num_prio();
 	capa->plain.max_num     = capa->max_queues;
+	capa->plain.nonblocking = ODP_BLOCKING;
 	capa->sched.max_num     = capa->max_queues;
+	capa->sched.nonblocking = ODP_BLOCKING;
 
 	return 0;
 }
@@ -601,6 +603,7 @@  static void queue_param_init(odp_queue_param_t *params)
 	params->type = ODP_QUEUE_TYPE_PLAIN;
 	params->enq_mode = ODP_QUEUE_OP_MT;
 	params->deq_mode = ODP_QUEUE_OP_MT;
+	params->nonblocking = ODP_BLOCKING;
 	params->sched.prio  = ODP_SCHED_PRIO_DEFAULT;
 	params->sched.sync  = ODP_SCHED_SYNC_PARALLEL;
 	params->sched.group = ODP_SCHED_GROUP_ALL;
diff --git a/platform/linux-generic/odp_queue_scalable.c b/platform/linux-generic/odp_queue_scalable.c
index 07201ce7b..88a5a8c27 100644
--- a/platform/linux-generic/odp_queue_scalable.c
+++ b/platform/linux-generic/odp_queue_scalable.c
@@ -315,8 +315,10 @@  static int queue_capability(odp_queue_capability_t *capa)
 	capa->sched_prios       = odp_schedule_num_prio();
 	capa->plain.max_num     = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
 	capa->plain.max_size    = 0;
+	capa->plain.nonblocking = ODP_BLOCKING;
 	capa->sched.max_num     = ODP_CONFIG_QUEUES - NUM_INTERNAL_QUEUES;
 	capa->sched.max_size    = 0;
+	capa->sched.nonblocking = ODP_BLOCKING;
 
 	return 0;
 }
@@ -861,6 +863,7 @@  static void queue_param_init(odp_queue_param_t *params)
 	params->type = ODP_QUEUE_TYPE_PLAIN;
 	params->enq_mode = ODP_QUEUE_OP_MT;
 	params->deq_mode = ODP_QUEUE_OP_MT;
+	params->nonblocking = ODP_BLOCKING;
 	params->sched.prio = ODP_SCHED_PRIO_DEFAULT;
 	params->sched.sync = ODP_SCHED_SYNC_PARALLEL;
 	params->sched.group = ODP_SCHED_GROUP_ALL;