OK. It avoids casting on application side.

Reviewed-by: Petri Savolainen <[email protected]>



> -----Original Message-----
> From: ext Maxim Uvarov [mailto:[email protected]]
> Sent: Tuesday, April 28, 2015 2:13 PM
> To: [email protected]; Petri Savolainen; Robbie King (robking)
> Subject: Re: [lng-odp] [PATCH] api: time: force time defines as ULL to
> avoid computation overflows on 32bits systems
> 
> Looks good. Perti, Robbie ok?
> 
> Maxim.
> 
> On 04/24/2015 16:09, Nicolas Morey-Chaisemartin wrote:
> > For example the odp_timer validation tests computes 10 * ODP_TIME_SEC
> and stores it into an uint64_t, but the computation overflows on 32b
> systems and the test fails
> >
> > Signed-off-by: Nicolas Morey-Chaisemartin <[email protected]>
> > ---
> >   include/odp/api/time.h | 6 +++---
> >   1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/include/odp/api/time.h b/include/odp/api/time.h
> > index 6b811d0..836866d 100644
> > --- a/include/odp/api/time.h
> > +++ b/include/odp/api/time.h
> > @@ -24,9 +24,9 @@ extern "C" {
> >    */
> >
> >   /* Time in nanoseconds */
> > -#define ODP_TIME_USEC 1000UL       /**< Microsecond in nsec */
> > -#define ODP_TIME_MSEC 1000000UL    /**< Millisecond in nsec */
> > -#define ODP_TIME_SEC  1000000000UL /**< Second in nsec */
> > +#define ODP_TIME_USEC 1000ULL       /**< Microsecond in nsec */
> > +#define ODP_TIME_MSEC 1000000ULL    /**< Millisecond in nsec */
> > +#define ODP_TIME_SEC  1000000000ULL /**< Second in nsec */
> >
> >
> >   /**
> > _______________________________________________
> > lng-odp mailing list
> > [email protected]
> > https://lists.linaro.org/mailman/listinfo/lng-odp

_______________________________________________
lng-odp mailing list
[email protected]
https://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to