Re: Doubt on wait_event_interruptible()

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

 



wait_event_interruptible() sleeps/loops until either the queue is awakened or a signal is received AND the condition is true. If queue was awakened code checks condition and if true, returns, else goes bak to sleep. If signal then the code returns. Your code must first call wait_event_interruptible() and then this code must have made the call to add_wait_queue() before another of your threads sends wake_up().
 
 
Stuart
 
----- Original Message -----
From: Anjaneyulu
Sent: Tuesday, December 11, 2001 9:37 PM
Subject: Doubt on wait_event_interruptible()

Hi,
I used wait_event_interruptible() for checking a particular condition on linux 2.4.18.
In the test program, I passed a condition to wait_event_interruptible() which evaluates to false.
The system hangs. Can anybody tell me the reason and solution?
 
When I pass a condition evaluating to TRUE, the task executes successfully .
 
Thanks in advance.
 
Regards,
Anj
 

[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