sim/hcitty: remove the poll lock to avoid invalid wait

It is unnecessary to protect pollnotify since the wakeup
source comes from idle thread

Change-Id: I99c06508029dc18aa8ded1cb672b14f77e9509a0
Signed-off-by: chao.an <anchao@xiaomi.com>
This commit is contained in:
chao.an
2021-01-19 17:27:15 +08:00
committed by chao an
parent b3f1c7b2d2
commit 832257677f
-9
View File
@@ -127,15 +127,8 @@ static inline void bthcitty_post(FAR sem_t *sem)
static void bthcitty_pollnotify(FAR struct bthcitty_s *dev,
pollevent_t eventset)
{
int ret;
int i;
ret = nxsem_wait_uninterruptible(&dev->fdslock);
if (ret < 0)
{
return;
}
for (i = 0; i < CONFIG_HCI_NPOLLWAITERS; i++)
{
FAR struct pollfd *fds = dev->fds[i];
@@ -152,8 +145,6 @@ static void bthcitty_pollnotify(FAR struct bthcitty_s *dev,
}
bthcitty_post(&dev->recvsem);
nxsem_post(&dev->fdslock);
}
static int bthcitty_open(FAR struct file *filep)