-
- Downloads
py: Add mp_pending_exception global variable, for VM soft interrupt.
This allows to implement KeyboardInterrupt on unix, and a much safer ctrl-C in stmhal port. First ctrl-C is a soft one, with hope that VM will notice it; second ctrl-C is a hard one that kills anything (for both unix and stmhal). One needs to check for a pending exception in the VM only for jump opcodes. Others can't produce an infinite loop (infinite recursion is caught by stack check).
Showing
- py/obj.h 1 addition, 0 deletionspy/obj.h
- py/objexcept.c 1 addition, 1 deletionpy/objexcept.c
- py/qstrdefs.h 1 addition, 0 deletionspy/qstrdefs.h
- py/runtime.c 6 additions, 0 deletionspy/runtime.c
- py/runtime.h 1 addition, 0 deletionspy/runtime.h
- py/vm.c 17 additions, 6 deletionspy/vm.c
- stmhal/pendsv.c 16 additions, 5 deletionsstmhal/pendsv.c
- stmhal/usb.c 1 addition, 1 deletionstmhal/usb.c
- stmhal/usbd_cdc_interface.c 0 additions, 1 deletionstmhal/usbd_cdc_interface.c
- unix/main.c 27 additions, 0 deletionsunix/main.c
Loading
Please register or sign in to comment