Message ID | 1450877908-24186-1-git-send-email-ivan.khoronzhuk@linaro.org |
---|---|
State | Accepted |
Commit | cfd6210d95457a8c7d969598978a69508ea2cb60 |
Headers | show |
Ok, great. Thanks. That should be good to go then. On Wed, Dec 23, 2015 at 7:38 AM, Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org > wrote: > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org> > --- > doc/users-guide/users-guide.adoc | 29 ++++++++++++++++++++++++++++- > 1 file changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/users-guide/users-guide.adoc > b/doc/users-guide/users-guide.adoc > index 7ec7957..8bc8521 100644 > --- a/doc/users-guide/users-guide.adoc > +++ b/doc/users-guide/users-guide.adoc > @@ -197,7 +197,7 @@ precise syntax and semantics of each API. > ODP programs are built around several conceptual structures that every > application programmer needs to be familiar with to use ODP effectively. > The > main ODP concepts are: > -Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Timer, > +Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Time, > Timer, > and Synchronizer. > > === Thread > @@ -305,6 +305,33 @@ or may represent a device attached via a PCIE or > other bus. > > PktIOs are represented by handles of abstract type +odp_pktio_t+. > > +=== Time > +The time API is used to measure time intervals and track time flow of an > +application and presents a convenient way to get access to a time source. > +The time API consists of two main parts: local time API and global time > API. > + > +==== Local time > +The local time API is designed to be used within one thread and can be > faster > +than the global time API. The local time API cannot be used between > threads as > +time consistency is not guaranteed, and in some cases that's enough. > +So, local time stamps are local to the calling thread and must not be > shared > +with other threads. Current local time can be read with > +odp_time_local()+. > + > +==== Global time > +The global time API is designed to be used for tracking time between > threads. > +So, global time stamps can be shared between threads. Current global time > can > +be read with +odp_time_global()+. > + > +Both, local and global time is not wrapped during the application life > cycle. > +The time API includes functions to operate with time, such as > +odp_time_diff()+, > ++odp_time_sum()+, +odp_time_cmp()+, conversion functions like > ++odp_time_to_ns()+, +odp_time_local_from_ns()+, > +odp_time_global_from_ns()+. > +To get rate of time source +odp_time_local_res()+, +odp_time_global_res()+ > +are used. To wait, +odp_time_wait_ns()+ and +odp_time_wait_until()+ are > used, > +during witch a thread potentially busy loop the entire wait time. > + > +The +odp_time_t+ opaque type represents local or global timestamps. > + > === Timer > Timers are how ODP applications measure and respond to the passage of > time. > Timers are drawn from specialized pools called timer pools that have their > -- > 1.9.1 > >
Merged, Maxim. On 12/23/2015 16:44, Bill Fischofer wrote: > Ok, great. Thanks. That should be good to go then. > > On Wed, Dec 23, 2015 at 7:38 AM, Ivan Khoronzhuk > <ivan.khoronzhuk@linaro.org <mailto:ivan.khoronzhuk@linaro.org>> wrote: > > Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org > <mailto:bill.fischofer@linaro.org>> > Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org > <mailto:ivan.khoronzhuk@linaro.org>> > --- > doc/users-guide/users-guide.adoc | 29 ++++++++++++++++++++++++++++- > 1 file changed, 28 insertions(+), 1 deletion(-) > > diff --git a/doc/users-guide/users-guide.adoc > b/doc/users-guide/users-guide.adoc > index 7ec7957..8bc8521 100644 > --- a/doc/users-guide/users-guide.adoc > +++ b/doc/users-guide/users-guide.adoc > @@ -197,7 +197,7 @@ precise syntax and semantics of each API. > ODP programs are built around several conceptual structures that > every > application programmer needs to be familiar with to use ODP > effectively. The > main ODP concepts are: > -Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, > Timer, > +Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, > Time, Timer, > and Synchronizer. > > === Thread > @@ -305,6 +305,33 @@ or may represent a device attached via a PCIE > or other bus. > > PktIOs are represented by handles of abstract type +odp_pktio_t+. > > +=== Time > +The time API is used to measure time intervals and track time > flow of an > +application and presents a convenient way to get access to a time > source. > +The time API consists of two main parts: local time API and > global time API. > + > +==== Local time > +The local time API is designed to be used within one thread and > can be faster > +than the global time API. The local time API cannot be used > between threads as > +time consistency is not guaranteed, and in some cases that's enough. > +So, local time stamps are local to the calling thread and must > not be shared > +with other threads. Current local time can be read with > +odp_time_local()+. > + > +==== Global time > +The global time API is designed to be used for tracking time > between threads. > +So, global time stamps can be shared between threads. Current > global time can > +be read with +odp_time_global()+. > + > +Both, local and global time is not wrapped during the application > life cycle. > +The time API includes functions to operate with time, such as > +odp_time_diff()+, > ++odp_time_sum()+, +odp_time_cmp()+, conversion functions like > ++odp_time_to_ns()+, +odp_time_local_from_ns()+, > +odp_time_global_from_ns()+. > +To get rate of time source +odp_time_local_res()+, > +odp_time_global_res()+ > +are used. To wait, +odp_time_wait_ns()+ and > +odp_time_wait_until()+ are used, > +during witch a thread potentially busy loop the entire wait time. > + > +The +odp_time_t+ opaque type represents local or global timestamps. > + > === Timer > Timers are how ODP applications measure and respond to the > passage of time. > Timers are drawn from specialized pools called timer pools that > have their > -- > 1.9.1 > > > > > _______________________________________________ > lng-odp mailing list > lng-odp@lists.linaro.org > https://lists.linaro.org/mailman/listinfo/lng-odp
diff --git a/doc/users-guide/users-guide.adoc b/doc/users-guide/users-guide.adoc index 7ec7957..8bc8521 100644 --- a/doc/users-guide/users-guide.adoc +++ b/doc/users-guide/users-guide.adoc @@ -197,7 +197,7 @@ precise syntax and semantics of each API. ODP programs are built around several conceptual structures that every application programmer needs to be familiar with to use ODP effectively. The main ODP concepts are: -Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Timer, +Thread, Event, Queue, Pool, Shared Memory, Buffer, Packet, PktIO, Time, Timer, and Synchronizer. === Thread @@ -305,6 +305,33 @@ or may represent a device attached via a PCIE or other bus. PktIOs are represented by handles of abstract type +odp_pktio_t+. +=== Time +The time API is used to measure time intervals and track time flow of an +application and presents a convenient way to get access to a time source. +The time API consists of two main parts: local time API and global time API. + +==== Local time +The local time API is designed to be used within one thread and can be faster +than the global time API. The local time API cannot be used between threads as +time consistency is not guaranteed, and in some cases that's enough. +So, local time stamps are local to the calling thread and must not be shared +with other threads. Current local time can be read with +odp_time_local()+. + +==== Global time +The global time API is designed to be used for tracking time between threads. +So, global time stamps can be shared between threads. Current global time can +be read with +odp_time_global()+. + +Both, local and global time is not wrapped during the application life cycle. +The time API includes functions to operate with time, such as +odp_time_diff()+, ++odp_time_sum()+, +odp_time_cmp()+, conversion functions like ++odp_time_to_ns()+, +odp_time_local_from_ns()+, +odp_time_global_from_ns()+. +To get rate of time source +odp_time_local_res()+, +odp_time_global_res()+ +are used. To wait, +odp_time_wait_ns()+ and +odp_time_wait_until()+ are used, +during witch a thread potentially busy loop the entire wait time. + +The +odp_time_t+ opaque type represents local or global timestamps. + === Timer Timers are how ODP applications measure and respond to the passage of time. Timers are drawn from specialized pools called timer pools that have their