On Fri, May 1, 2009 at 6:14 PM, Robert P. J. Day <[email protected]> wrote:
>
>  (from now on, i'll use "ELDD" to refer to the book "essential linux
> device drivers.")
>
>  on p. 34 of ELDD, we see an example of using schedule_timeout():
>
>  unsigned long timeout = jiffies + HZ;
>  schedule_timeout(timeout);
>
> that doesn't look right, does it?  i thought schedule_timeout() took,
> as an arg, the number of clock ticks to wait.  what the above is doing
> is calculating an actual *time* in the future, "jiffies + HZ"
> representing the time (in jiffies) one second from now.
>
> or am i misreading something?

Uhum, I agree with you Robert. schedule_timeout() should take its
parameter as sleep interval, not the when it should be awaken.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to