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