summaryrefslogtreecommitdiff
path: root/py/mpconfig.h
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2021-04-25 22:24:49 +1000
committerDamien George <damien@micropython.org>2021-04-30 15:32:16 +1000
commit916c3fd23fc4b636a8007525c3bd6308d01509d0 (patch)
tree354894b3976b46a8e01c75c4605848b95e75a81f /py/mpconfig.h
parente9e9c76ddf131f8e50b0ae2d44501d3cd88537ef (diff)
py/scheduler: Add optional port hook for when something is scheduled.
So that a port can "wake up" when there is work to do. Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/mpconfig.h')
-rw-r--r--py/mpconfig.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/py/mpconfig.h b/py/mpconfig.h
index 4445e9aee..7337994a5 100644
--- a/py/mpconfig.h
+++ b/py/mpconfig.h
@@ -550,6 +550,12 @@
#define MICROPY_VM_HOOK_RETURN
#endif
+// Hook for mp_sched_schedule when a function gets scheduled on sched_queue
+// (this macro executes within an atomic section)
+#ifndef MICROPY_SCHED_HOOK_SCHEDULED
+#define MICROPY_SCHED_HOOK_SCHEDULED
+#endif
+
// Whether to include the garbage collector
#ifndef MICROPY_ENABLE_GC
#define MICROPY_ENABLE_GC (0)