diff mbox

[RFC,2/2] validation: schedule: make sure SCHED queues get freed from the scheduler

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

Commit Message

Ciprian Barbu March 13, 2015, 10:02 a.m. UTC
This seems to be necessary only for linux-generic; SCHED type queues are
not marked as free in odp_queue_destroy, they need to be processed by the
scheduler so that the internal priority queues also get drained.

Signed-off-by: Ciprian Barbu <ciprian.barbu@linaro.org>
---
 test/validation/odp_schedule.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/test/validation/odp_schedule.c b/test/validation/odp_schedule.c
index b86f997..169c79e 100644
--- a/test/validation/odp_schedule.c
+++ b/test/validation/odp_schedule.c
@@ -645,6 +645,11 @@  static int destroy_queues(void)
 	for (i = 0; i < prios; i++) {
 		for (j = 0; j < QUEUES_PER_PRIO; j++) {
 			char name[32];
+			odp_event_t ev;
+
+			ev = odp_schedule(NULL, ODP_SCHED_NO_WAIT);
+			if (ev != ODP_EVENT_INVALID)
+				odp_buffer_free(odp_buffer_from_event(ev));
 
 			snprintf(name, sizeof(name), "sched_%d_%d_n", i, j);
 			if (destroy_queue(name))