int result = ERROR_OK;
if (target->smp && !single_hart) {
struct target_list *tlist;
- foreach_smp_target(tlist, target->smp_targets) {
+ foreach_smp_target_direction(resume_order == RO_NORMAL,
+ tlist, target->smp_targets) {
struct target *t = tlist->target;
if (resume_prep(t, current, address, handle_breakpoints,
debug_execution) != ERROR_OK)
result = ERROR_FAIL;
}
- foreach_smp_target(tlist, target->smp_targets) {
+ foreach_smp_target_direction(resume_order == RO_NORMAL,
+ tlist, target->smp_targets) {
struct target *t = tlist->target;
riscv_info_t *i = riscv_info(t);
if (i->prepped) {
}
}
- foreach_smp_target(tlist, target->smp_targets) {
+ foreach_smp_target_direction(resume_order == RO_NORMAL,
+ tlist, target->smp_targets) {
struct target *t = tlist->target;
if (resume_finish(t) != ERROR_OK)
return ERROR_FAIL;
#define foreach_smp_target(pos, head) \
list_for_each_entry(pos, head, lh)
+#define foreach_smp_target_direction(forward, pos, head) \
+ list_for_each_entry_direction(forward, pos, head, lh)
+
extern const struct command_registration smp_command_handlers[];
int gdb_read_smp_packet(struct connection *connection,