rptun: add timeout to wait_tx_buffer callback

Signed-off-by: ligd <liguiding1@xiaomi.com>
This commit is contained in:
ligd 2022-04-27 16:58:02 +08:00 committed by Xiang Xiao
parent 46e5e576e1
commit 46713eaf16
1 changed files with 3 additions and 1 deletions

View File

@ -54,6 +54,8 @@
#define RPTUNIOC_NONE 0
#define RPTUN_TIMEOUT_MS 20
/****************************************************************************
* Private Types
****************************************************************************/
@ -501,7 +503,7 @@ static int rptun_notify_wait(FAR struct remoteproc *rproc, uint32_t id)
/* Wait to wakeup */
nxsem_wait(&priv->semtx);
nxsem_tickwait(&priv->semtx, MSEC2TICK(RPTUN_TIMEOUT_MS));
rptun_worker(priv);
return 0;