Skip to content

Commit 946daa5

Browse files
committed
idc: zephyr: add a timeout to blocking IDC send
Replace infinite wait with a time-limited wait. In case a blocking IDC message is not handled within IDC_TIMEOUT, return an error instead of waiting. This allows to debug stuck core-to-core communication easier. Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
1 parent 7507b32 commit 946daa5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/idc/zephyr_idc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ int idc_send_msg(struct idc_msg *msg, uint32_t mode)
151151

152152
switch (mode) {
153153
case IDC_BLOCKING:
154-
ret = k_p4wq_wait(work, K_FOREVER);
154+
ret = k_p4wq_wait(work, K_USEC(IDC_TIMEOUT));
155155
if (!ret)
156156
/* message was sent and executed successfully, get status code */
157157
ret = idc_msg_status_get(msg->core);

0 commit comments

Comments
 (0)