diff mbox

[API-NEXT] api: queue: remove const qualifier of passed down event array

Message ID 1461263496-21805-1-git-send-email-zoltan.kiss@linaro.org
State New
Headers show

Commit Message

Zoltan Kiss April 21, 2016, 6:31 p.m. UTC
As the description says, normally this function consumes the events, which
means there is no point to expect the array to stay intact. Other functions
like odp_pktout_send() doesn't do that as well.

Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>
---

Comments

Bill Fischofer April 21, 2016, 6:43 p.m. UTC | #1
On Thu, Apr 21, 2016 at 1:31 PM, Zoltan Kiss <zoltan.kiss@linaro.org> wrote:

> As the description says, normally this function consumes the events, which

> means there is no point to expect the array to stay intact. Other functions

> like odp_pktout_send() doesn't do that as well.

>

> Signed-off-by: Zoltan Kiss <zoltan.kiss@linaro.org>

>


Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org>



> ---

>

> diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h

> index 7626ca7..c420fde 100644

> --- a/include/odp/api/spec/queue.h

> +++ b/include/odp/api/spec/queue.h

> @@ -237,7 +237,7 @@ int odp_queue_enq(odp_queue_t queue, odp_event_t ev);

>   * @return Number of events actually enqueued (0 ... num)

>   * @retval <0 on failure

>   */

> -int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[],

> int num);

> +int odp_queue_enq_multi(odp_queue_t queue, odp_event_t events[], int num);

>

>  /**

>   * Queue dequeue

> diff --git a/platform/linux-generic/odp_queue.c

> b/platform/linux-generic/odp_queue.c

> index 342ffa2..29faa29 100644

> --- a/platform/linux-generic/odp_queue.c

> +++ b/platform/linux-generic/odp_queue.c

> @@ -647,7 +647,7 @@ int queue_enq_multi(queue_entry_t *queue,

> odp_buffer_hdr_t *buf_hdr[],

>         return num; /* All events enqueued */

>  }

>

> -int odp_queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int

> num)

> +int odp_queue_enq_multi(odp_queue_t handle, odp_event_t ev[], int num)

>  {

>         odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX];

>         queue_entry_t *queue;

>
diff mbox

Patch

diff --git a/include/odp/api/spec/queue.h b/include/odp/api/spec/queue.h
index 7626ca7..c420fde 100644
--- a/include/odp/api/spec/queue.h
+++ b/include/odp/api/spec/queue.h
@@ -237,7 +237,7 @@  int odp_queue_enq(odp_queue_t queue, odp_event_t ev);
  * @return Number of events actually enqueued (0 ... num)
  * @retval <0 on failure
  */
-int odp_queue_enq_multi(odp_queue_t queue, const odp_event_t events[], int num);
+int odp_queue_enq_multi(odp_queue_t queue, odp_event_t events[], int num);
 
 /**
  * Queue dequeue
diff --git a/platform/linux-generic/odp_queue.c b/platform/linux-generic/odp_queue.c
index 342ffa2..29faa29 100644
--- a/platform/linux-generic/odp_queue.c
+++ b/platform/linux-generic/odp_queue.c
@@ -647,7 +647,7 @@  int queue_enq_multi(queue_entry_t *queue, odp_buffer_hdr_t *buf_hdr[],
 	return num; /* All events enqueued */
 }
 
-int odp_queue_enq_multi(odp_queue_t handle, const odp_event_t ev[], int num)
+int odp_queue_enq_multi(odp_queue_t handle, odp_event_t ev[], int num)
 {
 	odp_buffer_hdr_t *buf_hdr[QUEUE_MULTI_MAX];
 	queue_entry_t *queue;