You can use interruptible_sleep_on or interruptible_sleep_on_timeout (similar are waking up function). Also have a look at wait_for_completion, which can call a registered function, once the event has occurred. Regards Mohanlal ----- Original Message ----- From: "l x" <whereisit28@yahoo.com> To: <kernelnewbies@nl.linux.org> Sent: Monday, June 14, 2004 11:00 PM Subject: Help - how to put a module into sleep for a while? > Hi, > > I'm working on a module (modB) that works with an > existing module (modA). > > One of modB's functions calls a function, > func_of_modA(), defined in modA. If the returned > value of func_of_modA() is 0, then modB needs to sleep > (not busy loop) for 1 sencond and then calls > func_of_modA() again...until the returned value is 1. > > What is the best/easiest way to implement this type of > wait? Could some one please help me on this? Sample > code or code snip would be very helpful. > > Thanks, > > T. > > > > > > __________________________________ > Do you Yahoo!? > Friends. Fun. Try the all-new Yahoo! Messenger. > http://messenger.yahoo.com/ > > -- > Kernelnewbies: Help each other learn about the Linux kernel. > Archive: http://mail.nl.linux.org/kernelnewbies/ > FAQ: http://kernelnewbies.org/faq/ > > -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/