Commit 167f2989 authored by Jan Kiszka's avatar Jan Kiszka

lib/copperplate: Fix eventobj_wait for COBALT_EVENT_ALL case

When we wait for all passed event bits to be set, we need to test for
those bits, not the ones that are currently pending. The current code
fails to detect that the condition is met when both the desired as well
as other events are already pending.

Reported by: Ronny Meeus <>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <>
parent 14607200
......@@ -217,7 +217,7 @@ int eventobj_wait(struct eventobj *evobj,
waitval = evobj->core.value & bits;
testval = mode & EVOBJ_ANY ? waitval : evobj->core.value;
testval = mode & EVOBJ_ANY ? waitval : bits;
if (waitval && waitval == testval) {
*bits_r = waitval;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment