On 11/04/2014 07:51 PM, Ciprian Barbu wrote:
On Tue, Nov 4, 2014 at 7:27 PM, Taras Kondratiuk
<taras.kondrat...@linaro.org> wrote:

Current ODP headers contains following parts in each file:

1. Platform-specific
1.a. Handle typedefs: e.g. odp_queue_t
1.b. Macros, enums:   e.g. ODP_SCHED_PRIO_NORMAL

2. Platform-independent
2.a. Data structures, typedefs: e.g. odp_queue_param_t
2.b. Function prototypes:       e.g. odp_queue_create()

Splitting them into platform-specific and platform-independent
parts looks straight forward until one wants to implement some API as
inline but that API needs a platform-independent typedef (2.a).
According to current C standards 'static inline' implementation must be
ahead of its prototype if prototype doesn't have 'static inline'. This
is our case.

This is solved in this patch by including odp_platform_defines.h and
odp_platform_inlines.h in odp.h first before anything else. All the
source files include only odp.h so the order is always preserved.

It seems the issue is present there. Just try to implement
odp_queue_create() as 'static inline' in odp_platform_inlines.h. I
understand that there is no reason to inline odp_queue_create(), but
this is just a good example of the issue.

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

Reply via email to