Advertisement
Guest User

Untitled

a guest
Apr 28th, 2015
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.88 KB | None | 0 0
  1.             // Loop through all the triggers that *could* be set, and start/end alarms
  2.             // depending on those that are/were/aren't/weren't. N.B. op::clz is defined
  3.             // in intrin.h, and serves as a portable wrapper to GCC's count-leading-zeroes
  4.             // intrinsic (https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html)
  5.             const int lastSource = (sourceMask[subsystem] ? 0 : op::clz(sourceMask[subsystem]));
  6.             for (alarm_source_id_t source_id = 0; source_id < lastSource; source_id++) {
  7.                
  8.                 if (!(sourceMask[subsystem] & (uint64_t(1) << source_id))) {
  9.                     // If this source wasn't masked into this particular interrogation,
  10.                     // we can't say anything about alarms that may or may not be active
  11.                     // under it. In order to avoid falsely claiming that such alarms have
  12.                     // ended, we need to skip all the below logic in such a case.
  13.                     continue;
  14.                 }
  15.                
  16.                 // ........
  17.             }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement