diff options
-rw-r--r-- | py/mpstate.h | 2 | ||||
-rw-r--r-- | py/qstr.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/py/mpstate.h b/py/mpstate.h index 9bb87f0ba..5f6cf5593 100644 --- a/py/mpstate.h +++ b/py/mpstate.h @@ -203,7 +203,7 @@ typedef struct _mp_state_vm_t { size_t qstr_last_alloc; size_t qstr_last_used; - #if MICROPY_PY_THREAD + #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL // This is a global mutex used to make qstr interning thread-safe. mp_thread_mutex_t qstr_mutex; #endif @@ -125,7 +125,7 @@ void qstr_init(void) { MP_STATE_VM(last_pool) = (qstr_pool_t*)&CONST_POOL; // we won't modify the const_pool since it has no allocated room left MP_STATE_VM(qstr_last_chunk) = NULL; - #if MICROPY_PY_THREAD + #if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL mp_thread_mutex_init(&MP_STATE_VM(qstr_mutex)); #endif } |