Commit fc0ad867 authored by Max Kellermann's avatar Max Kellermann

GlobalEvents: wake up only if the flags were empty

Don't bother checking for the parameter mask. This doesn't matter. The only thing that matters is if a wake-up is already pending.
parent 19c67ab7
...@@ -109,6 +109,6 @@ GlobalEvents::Emit(Event event) ...@@ -109,6 +109,6 @@ GlobalEvents::Emit(Event event)
assert((unsigned)event < MAX); assert((unsigned)event < MAX);
const unsigned mask = 1u << unsigned(event); const unsigned mask = 1u << unsigned(event);
if ((GlobalEvents::flags.fetch_or(mask) & mask) == 0) if (GlobalEvents::flags.fetch_or(mask) == 0)
wake_fd.Write(); wake_fd.Write();
} }
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