Re: Trying to make kernel thread sleep

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

 




On Mon, 28 Aug 2006, Nish Aravamudan wrote:

On Sun, 27 Aug 2006, Nish Aravamudan wrote:
> *sleep_on* are deprecated and racy.
http://lwn.net/Articles/68118/


Thanks for the reference.

One would expect that if the only goal is to wait for a period of
time, then calls such as
interruptible_sleep_on(&my_wait);
should be ok, no? (Why one would do that is another issue of course; normally there is some condition to be met to break the sleep.)

There also seem to be a bunch of calls to fix the situation in the article, such as wait_event_timeout() which seem include both a timeout and a condition that must be met. Don't know when they were introduced.

For example:
wait_event_timeout( wq, flag != 0, sleep_jiffies);
wait_event_interruptible( wq, flag != 0 );

/Ricard
--
Ricard Wolf Wanderlöf                           ricardw(at)axis.com
Axis Communications AB, Lund, Sweden            www.axis.com
Phone +46 46 272 2016                           Fax +46 46 13 61 30

[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