micropython/py
David Lechner 259d9b69fe py/mpstate: Schedule KeyboardInterrupt on main thread.
This introduces a new macro to get the main thread and uses it to ensure
that asynchronous exceptions such as KeyboardInterrupt (CTRL+C) are only
scheduled on the main thread. This is more deterministic than being
scheduled on a random thread and is more in line with CPython that only
allow signal handlers to run on the main thread.

Fixes issue #7026.

Signed-off-by: David Lechner <david@pybricks.com>
2021-06-19 09:49:00 +10:00
..
argcheck.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
asmarm.c py/emitglue: Always flush caches when assigning native ARM code. 2021-06-05 11:03:04 +10:00
asmarm.h py/emitglue: Always flush caches when assigning native ARM code. 2021-06-05 11:03:04 +10:00
asmbase.c
asmbase.h
asmthumb.c py/emitglue: Always flush caches when assigning native ARM code. 2021-06-05 11:03:04 +10:00
asmthumb.h py/emitglue: Always flush caches when assigning native ARM code. 2021-06-05 11:03:04 +10:00
asmx64.c py/asmx64: Support use of top 8 regs in src_r64 argument. 2021-05-20 23:43:25 +10:00
asmx64.h py/asm: Add condition codes for signed comparisons. 2020-06-27 00:24:04 +10:00
asmx86.c py/asm: Add funcs/macros to emit machine code for logical-shift-right. 2020-06-27 00:24:04 +10:00
asmx86.h py/asm: Add condition codes for signed comparisons. 2020-06-27 00:24:04 +10:00
asmxtensa.c
asmxtensa.h py/asm: Add funcs/macros to emit machine code for logical-shift-right. 2020-06-27 00:24:04 +10:00
bc.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
bc.h py/showbc: Pass in an mp_print_t struct to all bytecode-print functions. 2020-09-11 17:22:28 +10:00
bc0.h
binary.c all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD. 2021-02-04 22:46:42 +11:00
binary.h
builtin.h
builtinevex.c
builtinhelp.c
builtinimport.c py/builtinimport: Change relative import's ValueError to ImportError. 2021-05-30 19:35:03 +10:00
compile.c py/compile: Raise an error on async with/for outside an async function. 2021-05-30 10:38:48 +10:00
compile.h
dynruntime.h py/dynruntime.h: Add mp_obj_get_array() function. 2021-04-28 00:06:46 +10:00
dynruntime.mk
emit.h
emitbc.c all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD. 2021-02-04 22:46:42 +11:00
emitcommon.c
emitglue.c py/emitglue: Always flush caches when assigning native ARM code. 2021-06-05 11:03:04 +10:00
emitglue.h
emitinlinethumb.c py/emitinlinethumb: Exclude code using #if when ARMV7M disabled. 2021-01-29 23:57:10 +11:00
emitinlinextensa.c py: Use unsigned comparison of chars. 2020-10-22 11:47:36 +02:00
emitnarm.c
emitnative.c py/emitnative: Fix x86-64 emitter to generate correct 8/16-bit stores. 2021-05-20 23:43:25 +10:00
emitnthumb.c
emitnx64.c
emitnx86.c
emitnxtensa.c
emitnxtensawin.c
formatfloat.c
formatfloat.h
frozenmod.c
frozenmod.h
gc.c py/gc: Only use no_sanitize_address attribute for GCC 4.8 and above. 2021-06-18 14:15:37 +10:00
gc.h py/gc: Change include of stdint.h to stddef.h. 2021-02-05 15:46:56 +11:00
grammar.h py/compile: Implement PEP 526, syntax for variable annotations. 2020-06-16 23:18:01 +10:00
lexer.c py, extmod: Introduce and use MP_FALLTHROUGH macro. 2020-10-22 11:53:16 +02:00
lexer.h py/compile: Implement PEP 572, assignment expressions with := operator. 2020-06-16 22:02:24 +10:00
makecompresseddata.py py/makecompresseddata.py: Make compression deterministic. 2020-04-20 10:32:49 +10:00
makemoduledefs.py all: Update Python code to conform to latest black formatting. 2020-08-29 15:18:01 +10:00
makeqstrdata.py
makeqstrdefs.py tools/makeqstrdefs.py: Run qstr preprocessing in parallel. 2020-11-12 15:04:53 +11:00
makeversionhdr.py py/makeversionhdr: Honor SOURCE_DATE_EPOCH if present. 2021-01-31 17:48:59 +01:00
malloc.c
map.c py/objdict: Add mp_const_empty_dict_obj, use it for mp_const_empty_map. 2020-10-10 00:16:26 +11:00
misc.h py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
mkenv.mk py/mkenv.mk: Don't emit info about BUILD_VERBOSE if it's set. 2021-05-12 13:22:13 +10:00
mkrules.cmake py/mkrules.cmake: Add MPY_LIB_DIR and BOARD_DIR to makemanifest call. 2021-05-23 00:00:39 +10:00
mkrules.mk py/mkrules.mk: Remove stray vpath and unused -Itmp, add $(Q) for $(AR). 2020-12-14 13:57:15 +11:00
modarray.c
modbuiltins.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
modcmath.c all: Format code to add space after C++-style comment start. 2020-04-23 11:24:25 +10:00
modcollections.c
modgc.c
modio.c py: Rename remaining object types to be of the form mp_type_xxx. 2021-03-26 13:48:34 +11:00
modmath.c py/modmath: Simplify handling of positional args to reduce code size. 2020-12-14 13:30:56 +11:00
modmicropython.c py/gc: Make gc_lock_depth have a count per thread. 2021-05-10 13:07:16 +10:00
modstruct.c
modsys.c py/modsys: Use consistent naming pattern for module-level const objects. 2020-05-28 10:02:14 +10:00
modthread.c py/mpstate: Make exceptions thread-local. 2021-06-19 09:43:44 +10:00
moduerrno.c all: Format code to add space after C++-style comment start. 2020-04-23 11:24:25 +10:00
mpconfig.h all: Bump version to 1.16. 2021-06-18 16:38:06 +10:00
mperrno.h
mphal.h all: Rename absolute time-based functions to include "epoch". 2020-09-18 17:20:34 +10:00
mpprint.c py/mpprint: Fix length calculation for strings with precision-modifier. 2020-12-07 23:32:06 +11:00
mpprint.h
mpstate.c
mpstate.h py/mpstate: Schedule KeyboardInterrupt on main thread. 2021-06-19 09:49:00 +10:00
mpthread.h
mpz.c py/mpz: Fix overflow of borrow in mpn_div. 2021-02-08 11:50:05 +11:00
mpz.h
nativeglue.c
nativeglue.h py/nativeglue.h: Rename "setjmp" entry to "setjmp_" to avoid any clash. 2020-05-14 21:48:05 +10:00
nlr.c
nlr.h py/nlr: Implement NLR for AArch64. 2021-03-11 12:51:10 +11:00
nlraarch64.c py/nlraarch64: Add underscore prefix to function symbols for Darwin ABI. 2021-05-18 11:46:30 +10:00
nlrpowerpc.c
nlrsetjmp.c
nlrthumb.c
nlrx64.c py/nlrx64: Correct the detection of Darwin ABI. 2021-05-18 11:52:00 +10:00
nlrx86.c
nlrxtensa.c
obj.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
obj.h py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
objarray.c py/objarray: Fix constructing a memoryview from a memoryview. 2021-05-18 10:18:56 +10:00
objarray.h py/objarray.h: Add mp_obj_memoryview_init() helper function. 2020-09-25 12:23:11 +10:00
objattrtuple.c
objbool.c
objboundmeth.c
objcell.c
objclosure.c py: Rename remaining object types to be of the form mp_type_xxx. 2021-03-26 13:48:34 +11:00
objcomplex.c py/objcomplex: Add mp_obj_get_complex_maybe for use in complex bin-op. 2020-06-27 01:03:10 +10:00
objdeque.c
objdict.c py: Rename remaining object types to be of the form mp_type_xxx. 2021-03-26 13:48:34 +11:00
objenumerate.c
objexcept.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
objexcept.h
objfilter.c
objfloat.c py: Rename BITS_PER_BYTE to MP_BITS_PER_BYTE. 2021-02-04 22:46:42 +11:00
objfun.c py/objfun: Support fun.__globals__ attribute. 2021-01-29 23:57:10 +11:00
objfun.h
objgenerator.c py: Rework mp_convert_member_lookup to properly handle built-ins. 2020-06-30 23:55:32 +10:00
objgenerator.h
objgetitemiter.c py: Rename remaining object types to be of the form mp_type_xxx. 2021-03-26 13:48:34 +11:00
objint.c py: Rename BITS_PER_BYTE to MP_BITS_PER_BYTE. 2021-02-04 22:46:42 +11:00
objint.h py/modsys: Use consistent naming pattern for module-level const objects. 2020-05-28 10:02:14 +10:00
objint_longlong.c py/modsys: Use consistent naming pattern for module-level const objects. 2020-05-28 10:02:14 +10:00
objint_mpz.c py/mpz: Do sign extension in mpz_as_bytes for negative values. 2020-11-11 22:18:24 +11:00
objlist.c
objlist.h
objmap.c
objmodule.c all: Rename "sys" module to "usys". 2020-09-04 00:10:24 +10:00
objmodule.h
objnamedtuple.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
objnamedtuple.h
objnone.c
objobject.c
objpolyiter.c
objproperty.c
objrange.c py: Rename remaining object types to be of the form mp_type_xxx. 2021-03-26 13:48:34 +11:00
objreversed.c
objset.c py, extmod: Introduce and use MP_FALLTHROUGH macro. 2020-10-22 11:53:16 +02:00
objsingleton.c
objslice.c
objstr.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
objstr.h
objstringio.c
objstringio.h
objstrunicode.c py/mpprint: Fix length calculation for strings with precision-modifier. 2020-12-07 23:32:06 +11:00
objtuple.c
objtuple.h
objtype.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
objtype.h
objzip.c
opmethods.c
pairheap.c
pairheap.h
parse.c py/parse: Expose rule-name printing as MICROPY_DEBUG_PARSE_RULE_NAME. 2020-10-01 15:26:43 +10:00
parse.h py/parse: Pass in an mp_print_t to mp_parse_node_print. 2020-09-11 23:00:03 +10:00
parsenum.c py: Add option to compile without any error messages at all. 2021-04-27 23:51:52 +10:00
parsenum.h
parsenumbase.c
parsenumbase.h
persistentcode.c all: Rename BYTES_PER_WORD to MP_BYTES_PER_OBJ_WORD. 2021-02-04 22:46:42 +11:00
persistentcode.h
profile.c py/mpstate: Make exceptions thread-local. 2021-06-19 09:43:44 +10:00
profile.h
py.cmake py/py.cmake: Introduce MICROPY_INC_CORE as a list with core includes. 2021-04-09 13:08:35 +10:00
py.mk py/nlr: Implement NLR for AArch64. 2021-03-11 12:51:10 +11:00
pystack.c
pystack.h
qstr.c
qstr.h py/qstr.h: Remove QSTR_FROM_STR_STATIC macro. 2021-01-30 13:40:48 +11:00
qstrdefs.h
reader.c
reader.h
repl.c py/repl: Don't read past the end of import_str. 2021-05-30 11:50:51 +10:00
repl.h
ringbuf.c
ringbuf.h extmod/modbluetooth: Make modbluetooth event not a bitfield. 2020-06-05 14:04:20 +10:00
runtime.c py/mpstate: Make exceptions thread-local. 2021-06-19 09:43:44 +10:00
runtime.h all: Rename mp_keyboard_interrupt to mp_sched_keyboard_interrupt. 2021-04-30 15:13:43 +10:00
runtime0.h
runtime_utils.c
scheduler.c py/mpstate: Schedule KeyboardInterrupt on main thread. 2021-06-19 09:49:00 +10:00
scope.c py/scope: Name and use id_kind_type_t. 2020-10-22 11:40:56 +02:00
scope.h py/scope: Name and use id_kind_type_t. 2020-10-22 11:40:56 +02:00
sequence.c
showbc.c py/showbc: Pass in an mp_print_t struct to all bytecode-print functions. 2020-09-11 17:22:28 +10:00
smallint.c
smallint.h py: Rename WORD_MSBIT_HIGH to MP_OBJ_WORD_MSBIT_HIGH. 2021-02-04 22:46:42 +11:00
stackctrl.c
stackctrl.h py/stackctrl: Prevent unused-var warning when stack checking disabled. 2021-06-05 11:03:09 +10:00
stream.c py/stream: Remove mp_stream_errno and use system errno instead. 2020-04-27 23:58:46 +10:00
stream.h
unicode.c
unicode.h
usermod.cmake rp2: Add support for USER_C_MODULES to CMake build system. 2021-03-31 00:26:01 +11:00
vm.c py/mpstate: Make exceptions thread-local. 2021-06-19 09:43:44 +10:00
vmentrytable.h py/vmentrytable: Ignore GCC -Woverride-init. 2020-10-22 11:47:36 +02:00
vstr.c
warning.c