forked from nuttx/nuttx-update
bluetooth: fix bt_slip_send would always block
rootcause: semcount maybe zero when nxsem_wait_uninterruptible Signed-off-by: chengkai <chengkai@xiaomi.com>
This commit is contained in:
parent
00eb8f6461
commit
aeb3051aba
1 changed files with 2 additions and 2 deletions
|
@ -558,8 +558,8 @@ static void bt_slip_unack_handle(FAR struct sliphci_s *priv)
|
|||
{
|
||||
int semcount;
|
||||
|
||||
nxsem_get_value(&priv->sem, &semcount);
|
||||
if (semcount < 0)
|
||||
while (nxsem_get_value(&priv->sem, &semcount) >= 0 &&
|
||||
semcount <= 0)
|
||||
{
|
||||
nxsem_post(&priv->sem);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue