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.
This commit is contained in:
Max Kellermann 2013-02-27 20:40:46 +01:00
parent 19c67ab724
commit fc0ad8674b

View File

@ -109,6 +109,6 @@ GlobalEvents::Emit(Event event)
assert((unsigned)event < MAX);
const unsigned mask = 1u << unsigned(event);
if ((GlobalEvents::flags.fetch_or(mask) & mask) == 0)
if (GlobalEvents::flags.fetch_or(mask) == 0)
wake_fd.Write();
}