6a1f721dda
This test case will call k_sem_give() twice and expect both to be received by k_sem_take(), yet the semaphore is initialized with a maximum count of one! The reason this worked was an undocumented misfeature of k_sem: if k_sem_take() was called on a semaphore with a pended thread, it would wake up that thread synchronously instead of incrementing the count. So you could call it once to wake up the thread and again to queue the count and not overflow. The problem is that this is a priority bug (a high priority runnable thread should have the chance to run and call k_sem_take() before a low priority thread that got woken). Zync corrects that, and so needs to have two slots if you want two semaphore events. Signed-off-by: Andy Ross <andyross@google.com> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj.conf | ||
testcase.yaml |