summaryrefslogtreecommitdiff
path: root/py
diff options
context:
space:
mode:
Diffstat (limited to 'py')
-rw-r--r--py/vm.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/py/vm.c b/py/vm.c
index 8abe65e43..b88cfd8d3 100644
--- a/py/vm.c
+++ b/py/vm.c
@@ -1322,11 +1322,12 @@ pending_exception_check:
#if MICROPY_PY_THREAD_GIL
#if MICROPY_PY_THREAD_GIL_VM_DIVISOR
- if (--gil_divisor == 0) {
- gil_divisor = MICROPY_PY_THREAD_GIL_VM_DIVISOR;
- #else
- {
+ if (--gil_divisor == 0)
#endif
+ {
+ #if MICROPY_PY_THREAD_GIL_VM_DIVISOR
+ gil_divisor = MICROPY_PY_THREAD_GIL_VM_DIVISOR;
+ #endif
#if MICROPY_ENABLE_SCHEDULER
// can only switch threads if the scheduler is unlocked
if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE)