Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
4859edb9
Commit
4859edb9
authored
Oct 15, 2014
by
Damien George
Browse files
py: Fix dummy definition of BEGIN/END_ATOMIC_SECTION.
parent
95908b0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
py/mpconfig.h
View file @
4859edb9
...
...
@@ -431,10 +431,10 @@ typedef double mp_float_t;
// On embedded platforms, these will typically enable/disable irqs.
#ifndef MICROPY_BEGIN_ATOMIC_SECTION
#define MICROPY_BEGIN_ATOMIC_SECTION()
#define MICROPY_BEGIN_ATOMIC_SECTION()
(0)
#endif
#ifndef MICROPY_END_ATOMIC_SECTION
#define MICROPY_END_ATOMIC_SECTION()
#define MICROPY_END_ATOMIC_SECTION(
state) (void)(state
)
#endif
// Allow to override static modifier for global objects, e.g. to use with
...
...
py/objexcept.c
View file @
4859edb9
...
...
@@ -88,10 +88,10 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) {
// Update the 2 variables atomically so that an interrupt can't occur
// between the assignments.
mp_uint_t
irq
_state
=
MICROPY_BEGIN_ATOMIC_SECTION
();
mp_uint_t
atomic
_state
=
MICROPY_BEGIN_ATOMIC_SECTION
();
mp_emergency_exception_buf_size
=
size
;
mp_emergency_exception_buf
=
buf
;
MICROPY_END_ATOMIC_SECTION
(
irq
_state
);
MICROPY_END_ATOMIC_SECTION
(
atomic
_state
);
if
(
old_buf
!=
NULL
)
{
m_free
(
old_buf
,
old_size
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment