Turn ipc_poke() into a regular wakeup on the waitq.
commit96c30c81327e058d9ccd42a8628f09c4f75b398a
authorJiří Zárevúcky <jiri.zarevucky@nic.cz>
Thu, 28 Jun 2018 15:36:29 +0000 (28 17:36 +0200)
committerJiří Zárevúcky <jiri.zarevucky@nic.cz>
Thu, 28 Jun 2018 15:45:37 +0000 (28 17:45 +0200)
tree3699a0f95305e2ef72c031078fe2978414ac6e55
parent82453b290d023987999898c01e25bbb3b086b3bb
Turn ipc_poke() into a regular wakeup on the waitq.

With prior behavior of ignoring the poke when no thread is blocking,
a thread could go to sleep just after a poke meant for it and sleep
indefinitely despite there being work to do.

After the change, worst case scenario, thread enters ipc wait, exits
immediately due to a previous poke, finds no work to do and enters ipc wait
again (possibly repeating the spurious wakeup a few times).
kernel/generic/include/synch/waitq.h
kernel/generic/src/ipc/ipc.c
kernel/generic/src/ipc/sysipc.c
kernel/generic/src/synch/waitq.c