soc: intel_adsp: ipc: don't call k_sem_init() multiple times
k_sem_init() is called for every IPC message sent in intel_adsp_ipc_send_message(). This has not had any side-effects in upstream configurations, but has been linked to a failing run of test_obj_tracking_sanity test case in downstream Zephyr use. Replace k_sem_init() with k_sem_reset() as this is more appropriate API to reset the semaphore count, and ensure deterministic behaviour in case a thread is waiting on the semaphore at time of reset. Suggested-by:Peter Mitsis <peter.mitsis@intel.com> Signed-off-by:
Kai Vehmanen <kai.vehmanen@linux.intel.com>
Loading
Please sign in to comment