CMSIS RTOS v1 Signals Implementation Issue #27279
Labels
area: Portability
Standard compliant code, toolchain abstraction
bug
The issue is a bug, or the PR is fixing a bug
priority: low
Low impact/importance bug
Stale
Hi Zephyr devs,
yesterday i've try zephyr for the first time.
My idea was to port a simple firmware that is written with CMSIS RTOS API v1 to Zephyr.
For this, i'm using zephyr's portability layer:
CONFIG_CMSIS_RTOS_V1=y
.This firmware uses signals API to sync threads, but something is not working, here there is a simple program to test the issue:
Digging in, i've found 2 problems:
zephyr/lib/cmsis_rtos_v1/cmsis_thread.c
Line 83 in e90873f
the custom data that is used for signals handling in your CMSIS implementation is, for what i can see, set for the current running thread and not for the created new thread: so when you call
zephyr/lib/cmsis_rtos_v1/cmsis_signal.c
Line 90 in e90873f
zephyr/lib/cmsis_rtos_v1/cmsis_thread.c
Line 85 in e90873f
zephyr/kernel/thread.c
Line 568 in e90873f
So signals handling for me is not working, a simple hack fixes the problem (only for demostration, sorry but i've not a deep knowledge of zephyr so feel free to fix this in a better way of course):
Also your test suit does not cover this case, in fact the current thread is waiting to be signaled and not the newly created like in my example:
zephyr/tests/portability/cmsis_rtos_v1/src/signal.c
Lines 72 to 90 in e90873f
Thanks
The text was updated successfully, but these errors were encountered: