We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05520cb commit 74b102bCopy full SHA for 74b102b
esp32/mpconfigport.h
@@ -206,6 +206,13 @@ extern const struct _mp_obj_module_t mp_module_network;
206
#define MP_PLAT_PRINT_STRN(str, len) mp_hal_stdout_tx_strn_cooked(str, len)
207
#define MP_SSIZE_MAX (0x7fffffff)
208
209
+// Note: these "critical nested" macros do not ensure cross-CPU exclusion,
210
+// the only disable interrupts on the current CPU. To full manage exclusion
211
+// one should use portENTER_CRITICAL/portEXIT_CRITICAL instead.
212
+#include "freertos/FreeRTOS.h"
213
+#define MICROPY_BEGIN_ATOMIC_SECTION() portENTER_CRITICAL_NESTED()
214
+#define MICROPY_END_ATOMIC_SECTION(state) portEXIT_CRITICAL_NESTED(state)
215
+
216
#if MICROPY_PY_THREAD
217
#define MICROPY_EVENT_POLL_HOOK \
218
do { \
0 commit comments