Re: Help - how to put a module into sleep for a while?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,
module wont sleep at all.You are putting down kernel
to sleep! In device driver also the process which
calls modules read/write function sleeps 
as one can sleep in process context,but this is
process not module.
i think you try it and definately yr system will halt.
i have'n't tried it,the reason is simple you better
think . Rather why you need to do this,such things 
 i had never seen,if the module can sleep would be
true?
then i really want to know the thoery behind it.
Prasanna
--- l x <whereisit28@yahoo.com> wrote:
> 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/
> 
> 



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


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux