summaryrefslogtreecommitdiffstatshomepage
path: root/py/objarray.c
diff options
context:
space:
mode:
authorJim Mussared <jim.mussared@gmail.com>2022-07-01 11:22:24 +1000
committerDamien George <damien@micropython.org>2022-07-12 15:54:33 +1000
commit8db99f11a7da84e29c2e9b37e9f224ab424d73e1 (patch)
treea9393543c5aa3bdb0e2285ee0af2cef24a5e3709 /py/objarray.c
parent1329155b969386623200feff776e87336bf8e2e7 (diff)
downloadmicropython-8db99f11a7da84e29c2e9b37e9f224ab424d73e1.tar.gz
micropython-8db99f11a7da84e29c2e9b37e9f224ab424d73e1.zip
py/scheduler: De-inline and fix race with pending exception / scheduler.
The optimisation that allows a single check in the VM for either a pending exception or non-empty scheduler queue doesn't work when threading is enabled, as one thread can clear the sched_state if it has no pending exception, meaning the thread with the pending exception will never see it. This removes that optimisation for threaded builds. Also fixes a race in non-scheduler builds where get-and-clear of the pending exception is not protected by the atomic section. Also removes the bulk of the inlining of pending exceptions and scheduler handling from the VM. This just costs code size and complexity at no performance benefit. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
Diffstat (limited to 'py/objarray.c')
0 files changed, 0 insertions, 0 deletions