tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Make condition variables take absolute wakeup time

On Wed, May 07, 2008 at 02:39:00PM +0100, Andrew Doran wrote:
> This is for PR kern/38554. I have compiled it but not tested it yet.
> Also, it doesn't handle kpause() but should. Any comments?

In the patch, sometimes cv_timedwait(,, x * hz) becomes cv_timedwait(,,
cv_time_sec(x)), but sometimes it becomes cv_timedwait(,,
cv_time_ticks(x)), as it does in dev/acpi/acpi_ec.c.

In dev/pad/pad.c, hz/100 becomes cv_time_tick(1), which is not the same
value if hz != 100.

These days, does hz >> 2 ever generate better code than hz / 4?
The latter may better express the programmer's intent, if it is "wait
one quarter of a second."


David Young             OJC Technologies      Urbana, IL * (217) 278-3933 ext 24

Home | Main Index | Thread Index | Old Index