summaryrefslogtreecommitdiff
path: root/unix/mpconfigport.h
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-12-23 00:06:37 +0200
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2015-12-23 00:07:00 +0200
commit1c9210bc2b58303c1df2ff287f17d178b1a2772b (patch)
treefb38fd67839a5738b43ca2a73a87a28938f2df8e /unix/mpconfigport.h
parente9751d2ac057070c52a7a67bd6e8b97e944ee088 (diff)
unix/unix_mphal: Raise KeyboardInterrupt straight from signal handler.
POSIX doesn't guarantee something like that to work, but it works on any system with careful signal implementation. Roughly, the requirement is that signal handler is executed in the context of the process, its main thread, etc. This is true for Linux. Also tested to work without issues on MacOSX.
Diffstat (limited to 'unix/mpconfigport.h')
-rw-r--r--unix/mpconfigport.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/unix/mpconfigport.h b/unix/mpconfigport.h
index a20f1c509..a74345817 100644
--- a/unix/mpconfigport.h
+++ b/unix/mpconfigport.h
@@ -128,6 +128,7 @@
#define MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF (1)
#define MICROPY_EMERGENCY_EXCEPTION_BUF_SIZE (256)
+#define MICROPY_ASYNC_KBD_INTR (1)
extern const struct _mp_obj_module_t mp_module_machine;
extern const struct _mp_obj_module_t mp_module_os;