Don't immediately segfault with -rtos on v0.11.
This commit is contained in:
parent
ccdd26e3ef
commit
10518351bb
|
@ -1012,6 +1012,9 @@ bool riscv_rtos_enabled(const struct target *target)
|
|||
void riscv_set_current_hartid(struct target *target, int hartid)
|
||||
{
|
||||
RISCV_INFO(r);
|
||||
if (!r->select_current_hart)
|
||||
return;
|
||||
|
||||
int previous_hartid = riscv_current_hartid(target);
|
||||
r->current_hartid = hartid;
|
||||
assert(riscv_rtos_enabled(target) || target->coreid == hartid);
|
||||
|
|
Loading…
Reference in New Issue