[Haiku-commits] r31215 - haiku/trunk/src/add-ons/kernel/drivers/power/acpi_embedded_controller
Clemens zeidler
clemens.zeidler at rwth-aachen.de
Mon Jun 29 17:22:40 CEST 2009
On Fri, 26 Jun 2009 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?
>
> Bye,
> Axel.
This is the BSD code. I also don't see why it is done this way maybe as
you said its cycle depending.
Clemens
More information about the Haiku-commits
mailing list