On 11/08/2015 09:42 PM, Bill Fischofer wrote:
> Signed-off-by: Bill Fischofer <[email protected]>
> ---
>  .../linux-generic/include/odp_queue_internal.h     | 44 
> ++++++++++++++++++++++
>  platform/linux-generic/odp_queue.c                 |  7 ++++
>  2 files changed, 51 insertions(+)
>
> diff --git a/platform/linux-generic/include/odp_queue_internal.h 
> b/platform/linux-generic/include/odp_queue_internal.h
> index 6322948..32e3288 100644
> --- a/platform/linux-generic/include/odp_queue_internal.h
> +++ b/platform/linux-generic/include/odp_queue_internal.h
> @@ -159,6 +159,50 @@ static inline int queue_prio(queue_entry_t *qe)
>       return qe->s.param.sched.prio;
>  }
>  
> +static inline odp_buffer_hdr_t *get_buf_tail(odp_buffer_hdr_t *buf_hdr)
> +{
> +     odp_buffer_hdr_t *buf_tail = buf_hdr->link ? buf_hdr->link : buf_hdr;
> +
> +     buf_hdr->next = buf_hdr->link;
> +     buf_hdr->link = NULL;
> +
> +     while (buf_tail->next)
> +             buf_tail = buf_tail->next;
> +
> +     return buf_tail;
> +}
> +
I think this one should have a different name as it deals with a "chain" (using 
->link) and not the regular list the other one do (->next)
Maybe get_buf_chain_tail ?

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to