py/mpstate: Make exceptions thread-local.
This moves mp_pending_exception from mp_state_vm_t to mp_state_thread_t. This allows exceptions to be scheduled on a specific thread. Signed-off-by: David Lechner <david@pybricks.com>
This commit is contained in:
committed by
Damien George
parent
7c51cb2307
commit
ca920f7218
@@ -62,7 +62,7 @@ void mp_init(void) {
|
||||
qstr_init();
|
||||
|
||||
// no pending exceptions to start with
|
||||
MP_STATE_VM(mp_pending_exception) = MP_OBJ_NULL;
|
||||
MP_STATE_THREAD(mp_pending_exception) = MP_OBJ_NULL;
|
||||
#if MICROPY_ENABLE_SCHEDULER
|
||||
MP_STATE_VM(sched_state) = MP_SCHED_IDLE;
|
||||
MP_STATE_VM(sched_idx) = 0;
|
||||
|
||||
Reference in New Issue
Block a user