aboutsummaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-28 10:52:19 +1000
committerDamien George <damien@micropython.org>2021-04-30 15:13:43 +1000
commit7cbf826a9575e18ce1b7fe11b0f0997509153260 (patch)
tree86cb6ddc61febdf3fbae964fd10eb9ecc62a52fa /py/mpconfig.h
parent7e549b6718e80136b03074765f1d4add209a21a5 (diff)
py/scheduler: Add mp_sched_exception() to schedule a pending exception.
This helper is added to properly set a pending exception, to mirror mp_sched_schedule(), which schedules a function. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 5c7212fd1..2934f8ec8 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -1504,6 +1504,10 @@ typedef double mp_float_t;
/*****************************************************************************/
/* Hooks for a port to wrap functions with attributes */
+#ifndef MICROPY_WRAP_MP_SCHED_EXCEPTION
+#define MICROPY_WRAP_MP_SCHED_EXCEPTION(f) f
+#endif
+
#ifndef MICROPY_WRAP_MP_KEYBOARD_INTERRUPT
#define MICROPY_WRAP_MP_KEYBOARD_INTERRUPT(f) f
#endif