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:
parent
19c67ab724
commit
fc0ad8674b
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user