Message ID | 1461263496-21805-1-git-send-email-zoltan.kiss@linaro.org |
---|---|
State | New |
Headers | show |
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 --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;
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> ---