Commit a10626b
committed
extmod/zephyr_kernel: Use same priority for spawned threads as creating thread.
Root cause investigation revealed that spawned threads had higher priority
(0) than main thread (1), causing z_reschedule() to immediately preempt
during GIL bounce windows (MP_THREAD_GIL_EXIT → MP_THREAD_GIL_ENTER).
When main thread executes multi-step operations like bytearray.append()
and bounces the GIL, higher priority waiting threads would immediately
preempt, acquire the GIL, and corrupt shared data structures.
Fix matches ports/zephyr proven approach: use k_thread_priority_get() to
inherit priority from creating thread, ensuring equal priority prevents
immediate preemption during GIL bounce.
Signed-off-by: Andrew Leech <andrew@alelec.net>1 parent d018d84 commit a10626b
File tree
61 files changed
+9310
-4
lines changed- extmod/zephyr_kernel/kernel
- lib
- ports
- extmod/zephyr_kernel
- kernel
- lib/zephyr
- arch/arm/core
- cortex_m
- kernel
- lib
- os
- utils
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
61 files changed
+9310
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
- .gitignore-14
- CLAUDE.md-177
- DOCSTRING_PARSING.md-268
- LVGL_DEVELOPMENT_NOTES.md-180
- README.md-63
- examples/Dynamic_loading_font_example.py+95-49
- examples/README.md+163
- examples/advanced_demo.py+5-3
- examples/custom_widget_example.py+18-2
- examples/example1.py+28-7
- examples/example3.py+13-9
- examples/fb_test.py+1-1
- examples/generic-st77xx-with-xpt2046.py+3-2
- examples/madctl/madctl_helper.py+1-1
- examples/png_example.py+56-20
- examples/uasyncio_example1.py+10-7
- gen/gen_mpy.py+1-689
- lvgl+1-1
- micropython.mk+1-16
- stubs/.gitignore-16
- stubs/README.md-39
- stubs/lvgl-stubs/__init__.py-2
- stubs/lvgl-stubs/py.typed
- stubs/pyproject.toml-42
Submodule zephyr updated from 256b7fa to 3cf7b20
Binary file not shown.
0 commit comments