> -----Original Message-----
> From: ext Anders Roxell [mailto:[email protected]]
> Sent: Tuesday, September 02, 2014 10:08 PM
> To: Petri Savolainen
> Cc: [email protected]
> Subject: Re: [lng-odp] [PATCH v2 2/2] Timer example error check
> 
> On 2014-09-02 15:47, Petri Savolainen wrote:
> > Signed-off-by: Petri Savolainen <[email protected]>
> > ---
> >  example/timer/odp_timer_test.c | 16 +++++++++++-----
> >  1 file changed, 11 insertions(+), 5 deletions(-)
> >
> > diff --git a/example/timer/odp_timer_test.c
> b/example/timer/odp_timer_test.c
> > index bf1d7df..f619665 100644
> > --- a/example/timer/odp_timer_test.c
> > +++ b/example/timer/odp_timer_test.c
> > @@ -26,10 +26,10 @@
> >  #define MAX_WORKERS           32            /**< Max worker threads */
> >  #define MSG_POOL_SIZE         (4*1024*1024) /**< Message pool size */
> >
> > -/* Nanoseconds */
> > -#define USEC 1000UL
> > -#define MSEC 1000000UL
> > -#define SEC  1000000000UL
> > +#define USEC ODP_TIME_USEC
> > +#define MSEC ODP_TIME_MSEC
> > +#define SEC  ODP_TIME_SEC
> 
> No, why duplicate it?

"args.min_us*USEC" is more readable than "args.min_us*ODP_TIME_USEC".

-Petri

> 
> Cheers,
> Anders
> 
> > +
> >
> >  /** Test arguments */
> >  typedef struct {
> > @@ -195,7 +195,7 @@ static void parse_args(int argc, char *argv[],
> test_args_t *args)
> >     args->core_count    = 0; /* all cores */
> >     args->resolution_us = 10000;
> >     args->min_us        = args->resolution_us;
> > -   args->max_us        = 100000000;
> > +   args->max_us        = 10000000;
> >     args->period_us     = 1000000;
> >     args->tmo_count     = 30;
> >
> > @@ -347,6 +347,12 @@ int main(int argc, char *argv[])
> >                                   args.min_us*USEC,
> >                                   args.max_us*USEC);
> >
> > +   if (test_timer == ODP_TIMER_INVALID) {
> > +           ODP_ERR("Timer create failed.\n");
> > +           return -1;
> > +   }
> > +
> > +
> >     odp_shm_print_all();
> >
> >     printf("CPU freq %"PRIu64" hz\n", odp_sys_cpu_hz());
> > --
> > 2.1.0
> >
> >
> > _______________________________________________
> > lng-odp mailing list
> > [email protected]
> > http://lists.linaro.org/mailman/listinfo/lng-odp
> 
> --
> Anders Roxell
> [email protected]
> M: +46 709 71 42 85 | IRC: roxell
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to