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
|