summaryrefslogtreecommitdiff
path: root/py/profile.c
diff options
context:
space:
mode:
authorDavid Lechner <david@pybricks.com>2021-05-10 21:53:22 -0500
committerDamien George <damien@micropython.org>2021-06-19 09:43:44 +1000
commitca920f72184c50f61002aa9d5cd01555b1e28b7b (patch)
treea46b6cb9c91a275015b351443d1cb1181d8c5d14 /py/profile.c
parent7c51cb2307eaca1a1ccc071e0bb5eb4a5f734610 (diff)
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>
Diffstat (limited to 'py/profile.c')
-rw-r--r--py/profile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/profile.c b/py/profile.c
index e5fb35f0e..054a0f9e6 100644
--- a/py/profile.c
+++ b/py/profile.c
@@ -297,7 +297,7 @@ STATIC mp_obj_t mp_prof_callback_invoke(mp_obj_t callback, prof_callback_args_t
mp_prof_is_executing = false;
- if (MP_STATE_VM(mp_pending_exception) != MP_OBJ_NULL) {
+ if (MP_STATE_THREAD(mp_pending_exception) != MP_OBJ_NULL) {
mp_handle_pending(true);
}
return top;