[Haiku-commits] r31215 - haiku/trunk/src/add-ons/kernel/drivers/power/acpi_embedded_controller

Axel Dörfler axeld at pinc-software.de
Fri Jun 26 20:54:43 CEST 2009


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.




More information about the Haiku-commits mailing list