-
Notifications
You must be signed in to change notification settings - Fork 1.5k
os init_state: add new state OSINIT_IDLELOOP #5590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This is for distinguish we are in init idle or idle loop. Use for assertion for sem_trywait & sem_wait Signed-off-by: ligd <liguiding1@xiaomi.com>
|
@masayuki2009 could you try this one? |
|
Hmm, stm32f4discovery:kostest (DEBUG build) failed with assertion. |
|
@masayuki2009 |
|
Can you revert this patch, and have a try ? |
|
These cmds for real hardware board ? |
|
BTW, do you have the stm32f4discovery board? |
Yes.
Unfortunately, no. |
|
Then, without this patch, the ostest can run pass ? |
According to the latest upstream test logs, it passed with I'm now preparing lm3s6965-ek:kostest with QEMU, so please wait. |
@GUIDINGLI So let me merge this PR. |
|
I found a new issue with sabre-6quad:netknsh which is not merged to the upstream. The call stack is And It seems that syslog flushes the internal buffers from the Idle task. |
Actual code is inside |
I found that up_putc() in imx_serial.c uses sem_wait(). |
|
It's good to know that this patch could catch the potential issue. |
Summary
os init_state: add new state OSINIT_IDLELOOP
This is for distinguish we are in init idle or idle loop.
Use for assertion for sem_trywait & sem_wait
In the previous PR:
#5577
There is a check error:
DEBUGASSERT(OSINIT_IDLELOOP() && !sched_idletask());
should be:
DEBUGASSERT(!OSINIT_IDLELOOP() || !sched_idletask());
And the last PR regression caused by lack of testing.
This time do the fully test.
Impact
idle take sem
Testing
Test in maix-bit:kostest, VELA