From a1c93a62b1d1020c5ef3ce1744469a118433d0e5 Mon Sep 17 00:00:00 2001 From: Damien George Date: Thu, 26 May 2016 10:53:34 +0000 Subject: py: Don't use gc or qstr mutex when the GIL is enabled. There is no need since the GIL already makes gc and qstr operations atomic. --- py/gc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'py/gc.c') diff --git a/py/gc.c b/py/gc.c index 86ed0ce30..1fd320602 100644 --- a/py/gc.c +++ b/py/gc.c @@ -94,7 +94,7 @@ #define FTB_CLEAR(block) do { MP_STATE_MEM(gc_finaliser_table_start)[(block) / BLOCKS_PER_FTB] &= (~(1 << ((block) & 7))); } while (0) #endif -#if MICROPY_PY_THREAD +#if MICROPY_PY_THREAD && !MICROPY_PY_THREAD_GIL #define GC_ENTER() mp_thread_mutex_lock(&MP_STATE_MEM(gc_mutex), 1) #define GC_EXIT() mp_thread_mutex_unlock(&MP_STATE_MEM(gc_mutex)) #else -- cgit v1.2.3