Re: "schedule_timeout()" typo in ELDD?

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

 



On Fri, May 1, 2009 at 6:14 PM, Robert P. J. Day <rpjday@xxxxxxxxxxxxxx> 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 ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux