From: EXT Christophe Milard [mailto:christophe.mil...@linaro.org]
Sent: Thursday, February 18, 2016 10:40 AM
To: Savolainen, Petri (Nokia - FI/Espoo) <petri.savolai...@nokia.com>
Cc: mike.hol...@linaro.org; bill.fischo...@linaro.org; lng-odp@lists.linaro.org
Subject: Re: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread more 
precisely



On 18 February 2016 at 09:27, Savolainen, Petri (Nokia - FI/Espoo) 
<petri.savolai...@nokia.com<mailto:petri.savolai...@nokia.com>> wrote:


> -----Original Message-----
> From: lng-odp 
> [mailto:lng-odp-boun...@lists.linaro.org<mailto:lng-odp-boun...@lists.linaro.org>]
>  On Behalf Of EXT
> Christophe Milard
> Sent: Thursday, February 18, 2016 10:07 AM
> To: mike.hol...@linaro.org<mailto:mike.hol...@linaro.org>; 
> bill.fischo...@linaro.org<mailto:bill.fischo...@linaro.org>
> Cc: lng-odp@lists.linaro.org<mailto:lng-odp@lists.linaro.org>
> Subject: [lng-odp] [PATCHv2 1/4] doc: glossary: defining ODP thread more
> precisely
>
> Signed-off-by: Christophe Milard 
> <christophe.mil...@linaro.org<mailto:christophe.mil...@linaro.org>>
> Reviewed-and-tested-by: Bill Fischofer 
> <bill.fischo...@linaro.org<mailto:bill.fischo...@linaro.org>>
> ---
>  doc/glossary.adoc | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
>
> diff --git a/doc/glossary.adoc b/doc/glossary.adoc
> index 8e514ee..becaf16 100644
> --- a/doc/glossary.adoc
> +++ b/doc/glossary.adoc
> @@ -9,9 +9,17 @@ control thread::
>      A control thread is a type of ODP thread. It will be isolated from
> the host
>      operating system house keeping tasks but will be scheduled by it and
> may
>      receive interrupts.
> +ODP instantiation process::
> +    The first process which is started when an ODP application is
> started.
> +    There is one single such process per ODP instantiation.

This is the one that called odp_init_global(). There can be only one global 
init per instance.


>  thread::
> -    An ODP thread is a flow of execution that in a Linux environment
> could be
> -    a Linux process or thread.
> +    the word thread (without any further specification) refers to an ODP
> +    thread.
> +ODP thread::
> +    An ODP thread is a flow of execution that belongs to ODP. In a Linux
> +    environment an ODP thread can be either a Linux process or a linux
> thread.
> +    In both cases, a linux process (or thread) is said to be an ODP
> thread if
> +    its PID is a descendant of the ODP instantiation process.


An implementation could also support other than child processes joining an 
instance, so this definition is too narrow. We'll need to add an ODP instance 
ID param into local init, but other than that, its implementation specific how 
ODP threads join an ODP instance (not always parent -> child connection). Also, 
can the instantiation process exit ODP? On some implementation it could and the 
instance terminates when the last ODP thread exits it.


So in general terms ODP thread in Linux: any pthread or process that is running 
as part of an ODP instance (have called odp_init_local()).

Thanks for your comments, Petri:
I understand your point, I was no really sure my definition was the best, but 
is was the best Gary and me could find.
Now, you say : " So in general terms ODP thread in Linux: any pthread or 
process that is running as part of an ODP instance (have called 
odp_init_local())."
Why do you limit that definition to linux?

Can we simply write that the instantiation thread is the one calling 
ODP_init_global and ODP threads are those calling ODP_init_local. On any 
implementation? If not what is the definition of an ODP thread? (independentely 
of the ODP implemetation)

Yes, that’s basically the definition. A call to init_global creates an instance 
and a call to init_local joins the calling thread into that instance.

Linux is so common platform that it’s good to use that as an example and 
explicitly state that both pthreads and processes can be “ODP threads”.

-Petri



Christophe


-Petri

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

Reply via email to