diff options
| author | Damien George <damien@micropython.org> | 2023-07-21 10:55:06 +1000 |
|---|---|---|
| committer | Damien George <damien@micropython.org> | 2023-07-24 15:04:27 +1000 |
| commit | 8ef5622b9b8cb8caabb138eaf3b1ecccccd882fa (patch) | |
| tree | c5e2433303edc35e31ef3b660fe696e2c29cf1de /tests/float/float_compare.py | |
| parent | ea1a5e43d08429bed96e251f68f77aa0334bb371 (diff) | |
py/runtime: Always initialise sched_state in mp_init.
When MICROPY_SCHEDULER_STATIC_NODES is enabled, the logic is unchanged.
When MICROPY_SCHEDULER_STATIC_NODES is disable, sched_state is now always
initialised to MP_SCHED_IDLE when calling mp_init(). For example, the use
of mp_sched_vm_abort(), if it aborts a running scheduled function, can lead
to the scheduler starting off in a locked state when the runtime is
restarted, and then it stays locked. This commit fixes that case by
resetting sched_state.
Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'tests/float/float_compare.py')
0 files changed, 0 insertions, 0 deletions
