micropython/extmod
Damien George f2ad152e7e extmod/modbluetooth: Run BLE IRQ callback in protected NLR context.
The call to invoke_irq_handler_run() always needs to run in a protected NLR
context, to catch exceptions from the Python handler, and the m_new's (and
also mp_local_alloc when PYSTACK is enabled).  With
MICROPY_PY_BLUETOOTH_USE_SYNC_EVENTS_WITH_INTERLOCK enabled there was
already an explicit nlr_push, and that is now used in all cases.

Without this change, on stm32 (for example), the callbacks from the BLE
stack to invoke_irq_handler() were made via static scheduled nodes which do
not have any NLR protection, and hence would lead to a hard fault (uncaught
NLR) if an exception was raised in the Python BLE IRQ handler.  This was a
regression introduced by 8045ac07f5, which is
fixed by this commit.

Signed-off-by: Damien George <damien@micropython.org>
2022-09-23 15:21:54 +10:00
..
axtls-include extmod: Update for move of crypto-algorithms, re1.5, uzlib to lib. 2021-07-12 16:37:07 +10:00
btstack extmod/modbluetooth: Replace def_handle with end_handle in char IRQ. 2022-09-09 11:24:24 +10:00
lwip-include
nimble extmod/modbluetooth: Replace def_handle with end_handle in char IRQ. 2022-09-09 11:24:24 +10:00
uasyncio all: Update all manifest.py files to use new features. 2022-09-05 18:43:18 +10:00
extmod.cmake extmod: Always use custom mbedtls error message code. 2022-07-18 22:55:22 +10:00
extmod.mk extmod: Always use custom mbedtls error message code. 2022-07-18 22:55:22 +10:00
font_petme128_8x8.h extmod: Move font_petme128_8x8.h from ports/stm32 to extmod. 2022-05-05 13:30:40 +10:00
machine_bitstream.c extmod: Add machine.bitstream. 2021-08-19 22:50:11 +10:00
machine_bitstream.h extmod: Add machine.bitstream. 2021-08-19 22:50:11 +10:00
machine_i2c.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_i2c.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_mem.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_mem.h
machine_pinbase.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_pinbase.h
machine_pulse.c
machine_pulse.h
machine_pwm.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_pwm.h extmod/machine_pwm: Factor out machine.PWM bindings to common code. 2021-09-04 16:31:17 +10:00
machine_signal.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_signal.h
machine_spi.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
machine_spi.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
misc.h stm32/moduos: Convert module to use extmod version. 2022-03-09 10:03:23 +11:00
modbluetooth.c extmod/modbluetooth: Run BLE IRQ callback in protected NLR context. 2022-09-23 15:21:54 +10:00
modbluetooth.h extmod/modbluetooth: Change data_len type from size_t to uint16_t. 2022-09-22 11:47:03 +10:00
modbtree.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modframebuf.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modlwip.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modnetwork.c extmod/modnetwork: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:50:25 +10:00
modnetwork.h py/obj: Add "full" and "empty" non-variable-length mp_obj_type_t. 2022-09-19 19:06:04 +10:00
modonewire.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduasyncio.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modubinascii.c py/objstr: Split mp_obj_str_from_vstr into bytes/str versions. 2022-08-26 16:43:55 +10:00
moducryptolib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moductypes.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduhashlib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduheapq.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modujson.c py/objstr: Optimise mp_obj_new_str_from_vstr for known-safe strings. 2022-08-26 16:44:35 +10:00
moduos.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduplatform.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduplatform.h extmod/moduplatform: Move platform PP definitions into a header. 2022-02-22 00:59:14 +11:00
modurandom.c extmod/modurandom: Fix missing void in empty argument list. 2022-06-07 23:41:49 +10:00
modure.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduselect.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modusocket.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modussl_axtls.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modussl_mbedtls.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modutimeq.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduwebsocket.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduwebsocket.h
moduzlib.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modwebrepl.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
mpbthci.c
mpbthci.h extmod/nimble: Add support for reading whole HCI UART packets. 2022-06-03 11:53:28 +10:00
network_cyw43.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
network_cyw43.h
network_ninaw10.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
network_wiznet5k.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
uos_dupterm.c extmod/uos_dupterm: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:52:01 +10:00
utime_mphal.c extmod/utime: Always invoke mp_hal_delay_ms when >= to 0ms. 2021-07-22 00:05:17 +10:00
utime_mphal.h
vfs.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs.h py/builtin: Clean up and simplify import_stat and builtin_open config. 2022-05-25 13:04:45 +10:00
vfs_blockdev.c
vfs_fat.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_fat.h
vfs_fat_diskio.c
vfs_fat_file.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_lfs.c all: Update to point to files in new shared/ directory. 2021-07-12 17:08:10 +10:00
vfs_lfs.h
vfs_lfsx.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_lfsx_file.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_posix.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
vfs_posix.h
vfs_posix_file.c extmod/vfs_posix_file: Implement finaliser for files. 2022-09-19 23:44:50 +10:00
vfs_reader.c
virtpin.c py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
virtpin.h