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