Messages in this thread | | | Date | Sat, 6 Nov 1999 22:45:53 +0100 | From | Jens Axboe <> | Subject | Re: 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/
| |