lkml.org 
[lkml]   [1999]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Time dalays in kernel modules implementations
On Sat, Nov 06 1999, Rafael E. Herrera wrote:
> The code goes like this:
>
> current->timeout = jiffies + tout;
> interruptible_sleep_on(&wait);
>
> Can anybody explain to me how to do the equivalent in 2.2.x? That is,
> how to port code dependent on current->timeout to the new API.

interruptible_sleep_on_timeout(&wait, tout);

The task may not sleep for the entire duration of tout,
so check the return value.

--
* Jens Axboe <axboe@image.dk>
* Linux CD-ROM Maintainer
* http://www.kernel.dk

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:54    [W:0.035 / U:1.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site