summaryrefslogtreecommitdiffstatshomepage
path: root/lib/utils/interrupt_char.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2020-02-06 20:25:54 +1100
committerDamien George <damien.p.george@gmail.com>2020-02-07 16:08:26 +1100
commit9efb36bfa66d5846c14f21778c25dff7dd733826 (patch)
treef87dd0a7a4a891f4042cbb6722d81718e3660e49 /lib/utils/interrupt_char.c
parent5a91cd9ff3e97b74ad6c9a615f810b8fcebbe110 (diff)
downloadmicropython-9efb36bfa66d5846c14f21778c25dff7dd733826.tar.gz
micropython-9efb36bfa66d5846c14f21778c25dff7dd733826.zip
py/scheduler: Move mp_keyboard_interrupt from lib/utils to py core.
This function is tightly coupled to the state and behaviour of the scheduler, and is a core part of the runtime: to schedule a pending exception. So move it there.
Diffstat (limited to 'lib/utils/interrupt_char.c')
-rw-r--r--lib/utils/interrupt_char.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/lib/utils/interrupt_char.c b/lib/utils/interrupt_char.c
index 43d45e5aec..3810f7a965 100644
--- a/lib/utils/interrupt_char.c
+++ b/lib/utils/interrupt_char.c
@@ -38,13 +38,4 @@ void mp_hal_set_interrupt_char(int c) {
mp_interrupt_char = c;
}
-void mp_keyboard_interrupt(void) {
- MP_STATE_VM(mp_pending_exception) = MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception));
- #if MICROPY_ENABLE_SCHEDULER
- if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) {
- MP_STATE_VM(sched_state) = MP_SCHED_PENDING;
- }
- #endif
-}
-
#endif