diff options
author | Damien George <damien.p.george@gmail.com> | 2018-05-16 12:33:39 +1000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2018-05-16 12:33:39 +1000 |
commit | 1b7487e519c2e2a66f2f5a45ebd238d0773ca3d3 (patch) | |
tree | ac6d709854be711e3c33cfe4facef98e9087abee /py | |
parent | b9ff46f1ed5e1468551890ce64a842c77c059ef6 (diff) |
py/vm: Adjust #if logic for gil_divisor so braces are balanced.
Having balanced braces { and } makes it easier to navigate the function.
Diffstat (limited to 'py')
-rw-r--r-- | py/vm.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -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) |