File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -265,8 +265,12 @@ STATIC mp_obj_t machine_reset(void) {
265265MP_DEFINE_CONST_FUN_OBJ_0 (machine_reset_obj , machine_reset );
266266
267267STATIC mp_obj_t machine_soft_reset (void ) {
268- pyexec_system_exit = PYEXEC_FORCED_EXIT ;
269- mp_raise_type (& mp_type_SystemExit );
268+ mp_sched_vm_abort ();
269+ // Either handle the pending abort, or wait if we aren't the main thread.
270+ for (;;) {
271+ MICROPY_EVENT_POLL_HOOK ;
272+ }
273+ return mp_const_none ;
270274}
271275MP_DEFINE_CONST_FUN_OBJ_0 (machine_soft_reset_obj , machine_soft_reset );
272276
Original file line number Diff line number Diff line change 7676#define MICROPY_FLOAT_IMPL (MICROPY_FLOAT_IMPL_FLOAT)
7777#endif
7878#define MICROPY_USE_INTERNAL_ERRNO (1)
79+ #define MICROPY_SCHED_VM_ABORT (1)
7980#define MICROPY_SCHEDULER_STATIC_NODES (1)
8081#define MICROPY_SCHEDULER_DEPTH (8)
8182#define MICROPY_VFS (1)
You can’t perform that action at this time.
0 commit comments