File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -431,10 +431,10 @@ typedef double mp_float_t;
431
431
432
432
// On embedded platforms, these will typically enable/disable irqs.
433
433
#ifndef MICROPY_BEGIN_ATOMIC_SECTION
434
- #define MICROPY_BEGIN_ATOMIC_SECTION ()
434
+ #define MICROPY_BEGIN_ATOMIC_SECTION () (0)
435
435
#endif
436
436
#ifndef MICROPY_END_ATOMIC_SECTION
437
- #define MICROPY_END_ATOMIC_SECTION ()
437
+ #define MICROPY_END_ATOMIC_SECTION (state ) (void)(state )
438
438
#endif
439
439
440
440
// 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) {
88
88
89
89
// Update the 2 variables atomically so that an interrupt can't occur
90
90
// between the assignments.
91
- mp_uint_t irq_state = MICROPY_BEGIN_ATOMIC_SECTION ();
91
+ mp_uint_t atomic_state = MICROPY_BEGIN_ATOMIC_SECTION ();
92
92
mp_emergency_exception_buf_size = size ;
93
93
mp_emergency_exception_buf = buf ;
94
- MICROPY_END_ATOMIC_SECTION (irq_state );
94
+ MICROPY_END_ATOMIC_SECTION (atomic_state );
95
95
96
96
if (old_buf != NULL ) {
97
97
m_free (old_buf , old_size );
You can’t perform that action at this time.
0 commit comments