mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 03:45:50 +08:00
poll: pollsetup should notify only one fd passd by caller
since it's redundant to iterate the whole fds array in setup Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
committed by
Alin Jerpelea
parent
11b3adf17f
commit
eddd90de78
+1
-6
@@ -246,11 +246,6 @@ static void tun_pollnotify(FAR struct tun_device_s *priv,
|
||||
nxsem_post(&priv->write_wait_sem);
|
||||
}
|
||||
|
||||
if (fds == NULL)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
poll_notify(&fds, 1, eventset);
|
||||
}
|
||||
|
||||
@@ -1186,7 +1181,7 @@ static int tun_poll(FAR struct file *filep,
|
||||
eventset |= POLLIN;
|
||||
}
|
||||
|
||||
tun_pollnotify(priv, eventset);
|
||||
poll_notify(&fds, 1, eventset);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user