def _generate_event_mask_triggers(self, task):
      code = C.sequence()
      for runnable in task.runnables:
         if runnable.processed:
            continue
         matching_runnables = self._find_compatible_runnables(task, runnable)
         self._generate_runnable_calls(code, matching_runnables)
         for matching in matching_runnables:
            matching.processed=True
      return code