On Sat, 2 May 2009, Mulyadi Santosa wrote: > 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. thought so -- already submitted an errata report for that. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Annoying Kernel Pedantry. Web page: http://crashcourse.ca Linked In: http://www.linkedin.com/in/rpjday Twitter: http://twitter.com/rpjday ========================================================================