Messages in this thread | | | From | Bret Indrelee <> | Subject | RE: Time dalays in kernel modules implementations | Date | Sat, 6 Nov 1999 13:46:50 -0600 |
| |
Rafael E. Herrera [mailto:raffo@neuronet.pitt.edu] wrote: > 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.
You can just call interruptible_sleep_on_timeout().
There is also a schedule_timeout() if you get code that needs to reschedule for a certain amount of time.
-Bret
------------------------------------------------------------- SBS Technologies, Connectivity Products ... solutions for real-time connectivity
Bret Indrelee, Engineer SBS Technologies, Inc., Connectivity Products 1284 Corporate Center Drive, St. Paul MN 55121 Direct: (651) 905-4731 Main: (651) 905-4700 Fax: (651) 905-4701 E-mail: bindrelee@sbs-cp.com http://www.sbs.com -------------------------------------------------------------
- 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/
| |