Re: sleep

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

 



On 9/18/05, linux lover <caprianking2002@xxxxxxxxx> wrote:
> You can use schedule_timeout like this
> current->state = TASK_UNINTERRUPTIBLE;
> schedule_timeout(X*HZ); /* Sleep for X seconds */
> current->state = TASK_INTERRUPTIBLE;
> 
>  
> On 9/19/05, raja <vnagaraju@xxxxxxxxxxxx> wrote: 
> > Hi,
> >   Would you please tell me how can i sleep in kernel space.
> > 
> > 

You can also use mdelay(<time_in_milliseconds) ,
udelay(delay_in_microseconds) and so on ... see linux/delay.h


-- 
Fawad Lateef

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