> -----Original Message-----
> From: Mike Holmes [mailto:mike.hol...@linaro.org]
> Sent: Monday, January 23, 2017 3:01 PM
> To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolainen@nokia-bell-
> labs.com>
> Cc: lng-odp@lists.linaro.org
> Subject: Re: [lng-odp] [PATCH v4 3/4] helper: move thread implementation
> under platform
> 
> On 23 January 2017 at 04:06, Savolainen, Petri (Nokia - FI/Espoo)
> <petri.savolai...@nokia-bell-labs.com> wrote:
> >
> >
> >
> >> --- /dev/null
> >> +++ b/helper/include/odp/helper/platform/linux-generic/threads_extn.h
> >
> >
> > This file and these functions are not odp-linux specific. Those depend
> mainly on Linux and somewhat on ODP, but should not depend at all on the
> odp-linux implementation.
> 
> I agree they perhaps should not, but currently they do call ODP APIs.
> For example odp_init_local  and if that implementation used in lines
> then it has to match by platform in non ABI mode.

A helper can of course call ODP API, but must not expect any particular 
implementation. I think this helper does not expect odp-linux implementation, 
it just expect ODP and Linux.

Helper code is part of application code and does not have to be anything else. 
When application is built in ABI compat mode, so must be helper code. When 
application is built with non-ABI compat, so can be helper code.


> 
> >
> > Should it be moved to here:
> > /helper/include/odp/helper/linux/threads.h
> 
> Possibly
> 
> There are three categories right now - two are portable and I made one
> bucket for all those that are not.
> 
> 1. True odp helpers used in the tests, examples etc that are portable
> 2. OS  abstractions that are used in the tests, examples etc that are
> portable
> 3. OS specific wrappers that may make some odp calls for you, and thus
> must = the odp platform in non ABI mode
> 
> As it stands even using the OS as a selector for (3) will mean it must
> still use the correct odp platform include exactly so it was simpler
> at this stage to leave it like that.


There's no problem if helper code is built with the same ABI/arch configuration 
as the application.

-Petri


Reply via email to