[U-Boot] [RFC][Timer API] Revised Specification - Implementation details

Wolfgang Denk wd at denx.de
Tue May 31 07:56:38 CEST 2011


Dear Reinhard Meyer,

In message <4DE47046.3010703 at emk-elektronik.de> you wrote:
> 
> Excuse me, but THIS API does not prevent the user to do a
> "(get_timer() - start) < timeout" inside the loop, making your argument moot.

You can be pretty sure that I will NAK any design that _prevents_ me
from doing this when I have specific reasons to do exactly this or
something similar.

It is definitely a good idea to provide simple and reliable ways for
standard tasks - but you also must provide the freedom to do things
differently when the standard way does not fit for a reason or
another.

This is also why I consider it mandatory that get_timer() (or
time_read() or whatever it is going t be called) uses a standard unit
of time like milliseconds, and not som random internal scaling.


Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Just because your doctor has a name for your condition  doesn't  mean
he knows what it is.


More information about the U-Boot mailing list