summaryrefslogtreecommitdiffstatshomepage
path: root/py/mpstate.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/mpstate.h')
-rw-r--r--py/mpstate.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/py/mpstate.h b/py/mpstate.h
index 2519c77e2d..a0e3d4f143 100644
--- a/py/mpstate.h
+++ b/py/mpstate.h
@@ -80,7 +80,6 @@ typedef struct _mp_state_mem_t {
int gc_stack_overflow;
MICROPY_GC_STACK_ENTRY_TYPE gc_stack[MICROPY_ALLOC_GC_STACK_SIZE];
- uint16_t gc_lock_depth;
// This variable controls auto garbage collection. If set to 0 then the
// GC won't automatically run when gc_alloc can't find enough blocks. But
@@ -253,6 +252,9 @@ typedef struct _mp_state_thread_t {
uint8_t *pystack_cur;
#endif
+ // Locking of the GC is done per thread.
+ uint16_t gc_lock_depth;
+
////////////////////////////////////////////////////////////
// START ROOT POINTER SECTION
// Everything that needs GC scanning must start here, and