pset_unlock(pset);
- processor = processor_list;
- do {
- if (needs_cause_ast_mask & (1U << processor->cpu_id)) {
- if (processor == current_processor())
- ast_on(AST_SFI);
- else
- cause_ast_check(processor);
+ for (int cpuid = lsb_first(needs_cause_ast_mask); cpuid >= 0; cpuid = lsb_next(needs_cause_ast_mask, cpuid)) {
+ processor = processor_array[cpuid];
+ if (processor == current_processor()) {
+ ast_on(AST_SFI);
+ } else {
+ cause_ast_check(processor);
}
- } while ((processor = processor->processor_list) != NULL);
+ }
/* Re-arm timer if still enabled */
simple_lock(&sfi_lock);
simple_unlock(&sfi_lock);
splx(s);
assert((SFI_CLASS_UNSPECIFIED < current_sfi_wait_class) && (current_sfi_wait_class < MAX_SFI_CLASS_ID));
+#if !CONFIG_EMBEDDED
ledger_credit(self->task->ledger, task_ledgers.sfi_wait_times[current_sfi_wait_class], sfi_wait_time);
+#endif /* !CONFIG_EMBEDDED */
}
/*