[Haiku-commits] r31215 - haiku/trunk/src/add-ons/kernel/drivers/power/acpi_embedded_controller
Ingo Weinhold
ingo_weinhold at gmx.de
Fri Jun 26 22:53:23 CEST 2009
On 2009-06-26 at 20:54:43 [+0200], Axel Dörfler <axeld at pinc-software.de>
wrote:
> czeidler at mail.berlios.de wrote:
> > - // ToDo: scale timeout for slow cpu see BSD code...
> > + bigtime_t slp_ival = gHz / 1000;
> > + if (slp_ival != 0) {
> > + count = ec_timeout;
> > + } else {
> > + /* hz has less than 1 ms resolution so scale timeout. */
> > + slp_ival = 1;
> > + count = ec_timeout / (1000 / gHz);
> > + }
>
> This looks a bit scary - why not waiting for a certain time instead of
> this strange thing? Or is the actual wait time specified in CPU cycles?
Furthermore Mr. Coding Style forgot to mention:
* slp_ival -> sleepInterval
* ToDo -> TODO
CU, Ingo
More information about the Haiku-commits
mailing list