Re: time delay

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

 



Hi,

kiran kumar a écrit :

> i was using time dealy using mdelay which is in the dead loop not allowing 
> kernel to do other activities. i want to use delay such a way that kernel should 
> do its normal activities besides being in the delay!

  set_current_state (TASK_INTERRUPTIBLE); /* or TASK_UNINTERRUPTIBLE */
  schedule_timeout (5 * HZ);              /* Will sleep 5 seconds */

Sincerly,

Thomas
-- 
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

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