aboutsummaryrefslogtreecommitdiff
path: root/test/performance/odp_scheduling.c
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2015-01-26 15:05:38 +0200
committerMaxim Uvarov <maxim.uvarov@linaro.org>2015-01-27 15:29:45 +0300
commitd3066cb4127082fc1ba76996d231dda36af4a605 (patch)
treef989bd3389d962d9da8754fbe3af61b621cb647e /test/performance/odp_scheduling.c
parent375146358ac73138e97341972ac404c8f5fd6b72 (diff)
api: event: odp_queue_deq
Changed odp_queue_deq() to use events instead of buffers. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-and-tested-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'test/performance/odp_scheduling.c')
-rw-r--r--test/performance/odp_scheduling.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/performance/odp_scheduling.c b/test/performance/odp_scheduling.c
index 7a48eed..9f6eca1 100644
--- a/test/performance/odp_scheduling.c
+++ b/test/performance/odp_scheduling.c
@@ -258,6 +258,7 @@ static int test_alloc_multi(int thr, odp_buffer_pool_t pool)
*/
static int test_poll_queue(int thr, odp_buffer_pool_t msg_pool)
{
+ odp_event_t ev;
odp_buffer_t buf;
test_message_t *t_msg;
odp_queue_t queue;
@@ -288,12 +289,16 @@ static int test_poll_queue(int thr, odp_buffer_pool_t msg_pool)
t1 = odp_time_cycles();
for (i = 0; i < QUEUE_ROUNDS; i++) {
- if (odp_queue_enq(queue, odp_buffer_to_event(buf))) {
+ ev = odp_buffer_to_event(buf);
+
+ if (odp_queue_enq(queue, ev)) {
LOG_ERR(" [%i] Queue enqueue failed.\n", thr);
return -1;
}
- buf = odp_queue_deq(queue);
+ ev = odp_queue_deq(queue);
+
+ buf = odp_buffer_from_event(ev);
if (!odp_buffer_is_valid(buf)) {
LOG_ERR(" [%i] Queue empty.\n", thr);