Time dalays in kernel modules implementations

Rafael E. Herrera (raffo@neuronet.pitt.edu)
Sat, 06 Nov 1999 13:39:33 -0500


Hi,

I'm porting a device driver from 2.0.x to 2.2.x. Since I'm a beginner in
kernel programming I'm learning as I go.

Right now I have to port a block of code that does a time delay. It uses
the variable (struct test_struct*) current->timeout, which is gone in
version 2.2.x. The implementation used is the same as that discussed in
Rubini's Linux Device Drivers book.

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.

Thanks.

-- 
Rafael Herrera

- 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/