File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -431,10 +431,10 @@ typedef double mp_float_t;
431431
432432// On embedded platforms, these will typically enable/disable irqs.
433433#ifndef MICROPY_BEGIN_ATOMIC_SECTION
434- #define MICROPY_BEGIN_ATOMIC_SECTION ()
434+ #define MICROPY_BEGIN_ATOMIC_SECTION () (0)
435435#endif
436436#ifndef MICROPY_END_ATOMIC_SECTION
437- #define MICROPY_END_ATOMIC_SECTION ()
437+ #define MICROPY_END_ATOMIC_SECTION (state ) (void)(state )
438438#endif
439439
440440// Allow to override static modifier for global objects, e.g. to use with
Original file line number Diff line number Diff line change @@ -88,10 +88,10 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) {
8888
8989 // Update the 2 variables atomically so that an interrupt can't occur
9090 // between the assignments.
91- mp_uint_t irq_state = MICROPY_BEGIN_ATOMIC_SECTION ();
91+ mp_uint_t atomic_state = MICROPY_BEGIN_ATOMIC_SECTION ();
9292 mp_emergency_exception_buf_size = size ;
9393 mp_emergency_exception_buf = buf ;
94- MICROPY_END_ATOMIC_SECTION (irq_state );
94+ MICROPY_END_ATOMIC_SECTION (atomic_state );
9595
9696 if (old_buf != NULL ) {
9797 m_free (old_buf , old_size );
You can’t perform that action at this time.
0 commit comments