micropython/ports/unix
Amir Gonnen cb332ddae8 unix/modffi: Add option to lock GC in callback, and cfun access.
Add an optional 'lock' kwarg to callback that locks GC and scheduler.  This
allows the callback to be invoked asynchronously in 'interrupt context',
for example as a signal handler.

Also add the 'cfun' member function to callback, that allows retrieving the
C callback function address.  This is needed when the callback should be
set to a struct field.

See related #7373.

Signed-off-by: Amir Gonnen <amirgonnen@gmail.com>
2021-06-24 23:12:26 +10:00
..
variants examples/usercmodules: Simplify user C module enabling. 2021-04-01 16:27:38 +11:00
.gitignore unix: Rename unix binaries to micropython-variant (not _variant). 2020-01-12 10:37:40 +11:00
Makefile stm32: Provide a custom BTstack runloop that integrates with soft timer. 2021-06-23 13:14:26 +10:00
alloc.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
coverage.c py/repl: Autocomplete builtin modules. 2021-05-02 23:11:14 +10:00
coveragecpp.cpp esp32,unix: Support building C++ code. 2020-10-29 15:29:50 +11:00
fatfs_port.c unix/fatfs_port: Fix month offset in timestamp calculation. 2020-09-02 00:19:06 +10:00
gccollect.c all: Factor gchelper code to one place and use it for unix & ARM ports. 2020-04-29 23:45:19 +10:00
input.c unix: Implement PEP 475 to retry syscalls failing with EINTR. 2020-03-27 14:40:46 +11:00
input.h ports: Make new ports/ sub-directory and move all ports there. 2017-09-06 13:40:51 +10:00
main.c unix/main: Increase stack limit on ARM architectures. 2021-06-05 11:03:09 +10:00
modffi.c unix/modffi: Add option to lock GC in callback, and cfun access. 2021-06-24 23:12:26 +10:00
modjni.c all: Format code to add space after C++-style comment start. 2020-04-23 11:24:25 +10:00
modmachine.c extmod/machine_mem: Only allow integers in machine.memX subscript. 2020-11-13 11:13:37 +11:00
modos.c unix/modos: Support larger integer range in uos.stat fields. 2020-09-01 12:36:28 +10:00
modtermios.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
modtime.c unix/modtime: Fix time() precision on unix ports with non-double floats. 2021-01-23 16:55:24 +11:00
moduos_vfs.c all: Reformat C and Python source code with tools/codeformat.py. 2020-02-28 10:33:03 +11:00
moduselect.c unix/moduselect: Don't allow both posix and non-posix configurations. 2021-02-16 14:59:52 +11:00
modusocket.c all: Format code to add space after C++-style comment start. 2020-04-23 11:24:25 +10:00
mpbthciport.c extmod/nimble: Make stm32 and unix NimBLE ports use synchronous events. 2020-11-13 17:19:05 +11:00
mpbtstackport.h unix: Implement BLE H4 HCI UART for btstack/nimble. 2020-09-08 12:53:24 +10:00
mpbtstackport_common.c unix/mpbtstackport_common: Implement mp_bluetooth_hci_active. 2021-02-12 12:07:05 +11:00
mpbtstackport_h4.c unix: Implement BLE H4 HCI UART for btstack/nimble. 2020-09-08 12:53:24 +10:00
mpbtstackport_usb.c extmod/modbluetooth: Refactor stack/hci/driver/port bindings. 2020-09-08 11:41:31 +10:00
mpconfigport.h unix: Handle pending events/scheduler in MICROPY_EVENT_POLL_HOOK. 2020-11-13 17:19:05 +11:00
mpconfigport.mk unix/mpconfigport.mk: Update comment about TLS implementations. 2019-06-05 15:28:30 +10:00
mphalport.h unix: Make mp_hal_delay_ms run MICROPY_EVENT_POLL_HOOK. 2020-11-13 17:19:05 +11:00
mpnimbleport.c extmod/nimble: Make stm32 and unix NimBLE ports use synchronous events. 2020-11-13 17:19:05 +11:00
mpnimbleport.h unix: Implement BLE H4 HCI UART for btstack/nimble. 2020-09-08 12:53:24 +10:00
mpthreadport.c unix: Fix build on arm64-darwin due to integer cast. 2021-06-15 00:08:24 +10:00
mpthreadport.h unix: Implement MICROPY_BEGIN/END_ATOMIC_SECTION protection macros. 2020-04-13 21:44:09 +10:00
qstrdefsport.h all: Add *FORMAT-OFF* in various places. 2020-02-28 10:31:07 +11:00
unix_mphal.c py/mpstate: Schedule KeyboardInterrupt on main thread. 2021-06-19 09:49:00 +10:00