mirror of
https://github.com/apache/nuttx.git
synced 2026-05-27 03:05:40 +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;
|
int semcount;
|
||||||
|
|
||||||
nxsem_get_value(&priv->sem, &semcount);
|
while (nxsem_get_value(&priv->sem, &semcount) >= 0 &&
|
||||||
if (semcount < 0)
|
semcount <= 0)
|
||||||
{
|
{
|
||||||
nxsem_post(&priv->sem);
|
nxsem_post(&priv->sem);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user