You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mbox uses wait_send and wait_fetch to check that there is task which waits an event. It doesn't occur often, but problems can arise in special scenario.
Procedure
Task A tried to fetch an data from mbox with timeout
If mbox is empty then Task A increase wait_fetch with mutex protection
Task A releases mutex and sys_arch_sem_wait(mail, timeout) to get an event.
Time expires and task A exit from sys_arch_sem_wait()
Context switching occurs, Task B post event with sys_arch_mbox_post()
After task B enque data to mbox, it'll check whether send an event or not
Task B sends an event because mbox was empty(first_msg == 1) and wait_fetch is not 0.
After context switching task A lock mutex and decrease wait_fetch and exit the function.
No task receive the event task B sent, so unexpected behavior can be happened.
The text was updated successfully, but these errors were encountered:
pillip8282
added a commit
to pillip8282/TizenRT
that referenced
this issue
Jan 4, 2022
lwIP mbox synchronization issue
Description
mbox uses wait_send and wait_fetch to check that there is task which waits an event. It doesn't occur often, but problems can arise in special scenario.
Procedure
The text was updated successfully, but these errors were encountered: