On 2015-02-02 22:44, Bill Fischofer wrote:
> Signed-off-by: Bill Fischofer <bill.fischo...@linaro.org>
> ---
>  .../linux-generic/include/odp/plat/buffer_types.h  | 15 ++++++++---
>  .../linux-generic/include/odp_buffer_inlines.h     | 12 ++++-----
>  .../linux-generic/include/odp_buffer_internal.h    | 31 
> +++++++++++-----------
>  platform/linux-generic/odp_packet.c                | 13 ++++-----
>  4 files changed, 40 insertions(+), 31 deletions(-)
> 
> diff --git a/platform/linux-generic/include/odp/plat/buffer_types.h 
> b/platform/linux-generic/include/odp/plat/buffer_types.h
> index 8601e61..3e7070e 100644
> --- a/platform/linux-generic/include/odp/plat/buffer_types.h
> +++ b/platform/linux-generic/include/odp/plat/buffer_types.h
> @@ -18,6 +18,7 @@ extern "C" {
>  #endif
>  
>  #include <odp/std_types.h>
> +#include <odp/plat/strong_types.h>
>  
>  /** @addtogroup odp_buffer ODP BUFFER
>   *  Operations on a buffer.
> @@ -25,16 +26,22 @@ extern "C" {
>   */
>  
>  /** ODP buffer */
> -typedef uint32_t odp_buffer_t;
> +typedef odp_handle_t odp_buffer_t;
>  
>  /** Invalid buffer */
> -#define ODP_BUFFER_INVALID (0xffffffff)
> +#define ODP_BUFFER_INVALID _odp_cast_scalar(odp_buffer_t, 0xffffffff)
>  
>  /** ODP buffer segment */
> -typedef odp_buffer_t odp_buffer_seg_t;
> +typedef odp_handle_t odp_buffer_seg_t;
>  
>  /** Invalid segment */
> -#define ODP_SEGMENT_INVALID ODP_BUFFER_INVALID
> +#define ODP_SEGMENT_INVALID ((odp_buffer_seg_t)ODP_BUFFER_INVALID)
> +
> +/** Get printable format of odp_buffer_t */
> +static inline uint64_t odp_buffer_to_u64(odp_buffer_t hdl)
> +{
> +     return _odp_pri(hdl);
> +}

The re-org has make it easier for the implementors of ODP.
However, its a bit harder to follow the structure now maybe.

"static inline functions" should go into:
platform/linux-generic/include/odp/*.h

and typedefs, defines, enums, and structs that are platform specific
should go into:
platform/linux-generic/include/odp/plat/*_types.h

doxygen clean API stuff should be in:
include/odp/api/*.h


So the "static inline functions" in this patch set are currently in the wrong
place.

Taras, have I stated this correctly?

Cheers,
Anders

_______________________________________________
lng-odp mailing list
lng-odp@lists.linaro.org
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to