This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new a32856f  sim/hcitty: remove the poll lock to avoid invalid wait
a32856f is described below

commit a32856f965c855e49954616840390594d76df18e
Author: chao.an <anc...@xiaomi.com>
AuthorDate: Tue Jan 19 17:27:15 2021 +0800

    sim/hcitty: remove the poll lock to avoid invalid wait
    
    it it unnecessary to protect pollnotify() since the wakeup
    source comes from idle thread
    
    Signed-off-by: chao.an <anc...@xiaomi.com>
---
 arch/sim/src/sim/up_hcitty.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/arch/sim/src/sim/up_hcitty.c b/arch/sim/src/sim/up_hcitty.c
index b592ace4..918fee9 100644
--- a/arch/sim/src/sim/up_hcitty.c
+++ b/arch/sim/src/sim/up_hcitty.c
@@ -126,15 +126,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];
@@ -150,7 +143,6 @@ static void bthcitty_pollnotify(FAR struct bthcitty_s *dev,
         }
     }
 
-  nxsem_post(&dev->fdslock);
   bthcitty_post(&dev->recvsem);
 }
 

Reply via email to