summaryrefslogtreecommitdiffstatshomepage
path: root/py/repl.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2016-10-19 14:24:56 +1100
committerDamien George <damien.p.george@gmail.com>2016-10-19 14:24:56 +1100
commit17ba6ef5fa7585d3e91dada3044e8e755cf99537 (patch)
treee1efc06edcae56f2f9c41151c3441b6e27571d4c /py/repl.h
parent204222653edbc2d01b5aed38b1de71a767cb5748 (diff)
downloadmicropython-17ba6ef5fa7585d3e91dada3044e8e755cf99537.tar.gz
micropython-17ba6ef5fa7585d3e91dada3044e8e755cf99537.zip
cc3200: Fix thread mutex's so threading works with interrupts.
Running Python code on a hard interrupt is incompatible with having a GIL, because most of the time the GIL will be held by the user thread when the interrupt arrives. Hard interrupts mean that we should process them right away and hence can't wait until the GIL is released. The problem with the current code is that a hard interrupt will try to exit/enter the GIL while it is still held by the user thread, hence leading to a deadlock. This patch works around such a problem by just making GIL exit/enter a no-op when in an interrupt context, or when interrupts are disabled. See issue #2406.
Diffstat (limited to 'py/repl.h')
0 files changed, 0 insertions, 0 deletions