Re: Periodic event in Kernel Module

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

 



On 2/12/07, topi <topi@xxxxxxxxxxx> wrote:
hi,
<snip>

Just FYI:

my code looks like:

for (;;)
{
      set_current_state(TASK_INTERRUPTIBLE);
      schedule_timeout(X);

schedule_timeout_interruptible() exists now.

      set_current_state(TASK_RUNNING);

And this is unnecessary (and adds an unnecessary mb()) since
schedule_timeout() guarantees to only return in TASK_RUNNING.

      if (signal_pending(current))
         break;

      do_work_here();
}

Thanks,
Nish

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