mirror of
https://github.com/apache/nuttx.git
synced 2026-05-24 07:46:16 +08:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user