summaryrefslogtreecommitdiffstatshomepage
path: root/py/scheduler.c
diff options
context:
space:
mode:
authorDamien George <damien@micropython.org>2023-12-01 13:24:19 +1100
committerDamien George <damien@micropython.org>2023-12-01 14:14:08 +1100
commitbfdf500ea5756a4f0f2f8b384389b6f70af69526 (patch)
treef8bdacef1eccb814e54c602e3cb2783ae3a53c93 /py/scheduler.c
parent7d784e53853db7935112d5952aee13c19b539255 (diff)
downloadmicropython-bfdf500ea5756a4f0f2f8b384389b6f70af69526.tar.gz
micropython-bfdf500ea5756a4f0f2f8b384389b6f70af69526.zip
py/mphal: Move configuration of ATOMIC_SECTION macros to mphal.h.
MICROPY_BEGIN_ATOMIC_SECTION/MICROPY_END_ATOMIC_SECTION belong more to the MicroPython HAL rather than build configuration settings, so move their default configuration to py/mphal.h, and require all users of these macros to include py/mphal.h (here, py/objexcept.c and py/scheduler.c). This helps ports separate configuration from their HAL implementations, and can improve build times (because mpconfig.h is included everywhere, whereas mphal.h is not). Signed-off-by: Damien George <damien@micropython.org>
Diffstat (limited to 'py/scheduler.c')
-rw-r--r--py/scheduler.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/py/scheduler.c b/py/scheduler.c
index 165b26dc86..b9a43bfbdb 100644
--- a/py/scheduler.c
+++ b/py/scheduler.c
@@ -26,6 +26,7 @@
#include <stdio.h>
+#include "py/mphal.h"
#include "py/runtime.h"
// Schedules an exception on the main thread (for exceptions "thrown" by async