Open loboris opened 5 years ago
Currently this scenario is not supported. SMP is not implemented yet.
I have fixed this issue for this and some other functions and now my application (the real one, not only the test code above) runs as expected. Looking forward for the full SMP implementations in this SDK ...
Expected behavior
Sending message with
xQueueSend
between tasks running on different processors should work.Actual behavior
Task 1, running on processor #0 sends to the queue with
xQueueSend
Task 2, running on processor #1 receives from the queue withxQueueReceive
After task1 sends the message, task2 switches to processor 0 and continues to run on it.
The source of the bug is probably in queue.c in a way the xTaskRemoveFromEventList function is used.
There is quite large amount of other FreeRTOS functions which are not prepared for dual processor usage and can present a big issue if/when used. This should be addressed as soon as possible!
Test code
SDK version
develop, 68b5563021689ec39f27777074f4b5c12319b4e1 Kendryte GNU Toolchain v8.2.0-20190213
Hardware
Sipeed MAIX-Bit, Dan-Dock
System
Ubuntu 18.04
Output produced by the test program:
Before the first
xQueueSend
task1 runs on processor #1. AfterxQueueSend
it runs on processor #0. There is no 50 ticks difference between tasks ticks any more, which proves that the tasks actually runs on the same processor.