Placing yourself in the waitqueue is fairly complex, because you
must put yourself in the queue before checking the condition.
There is a macro to do this:
first argument is the wait queue head, and the second is an
expression which is evaluated; the macro returns
0 when this expression is true, or
-ERESTARTSYS if a signal is received.
wait_event() version ignores signals.