Btw, even if the code is protected with a spinlock you must use
set_current_state, spin_unlock() is only a partial memory barrier (at
least on i386 and ia64).
set_current_state(TASK_UNINTERRUPTIBLE)
/* __set_current_state() can lock up */
spin_unlock(&lock);
if (event_happened_meanwhile)
break;
schedule();
-- Manfred - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org Please read the FAQ at http://www.tux.org/lkml/