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:
Xiang Xiao
2023-11-19 19:19:53 +08:00
committed by Alin Jerpelea
parent 11b3adf17f
commit eddd90de78
84 changed files with 373 additions and 396 deletions
+1 -6
View File
@@ -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
{