zephyr/drivers/net
Marcin Niestroj ea44e2715a drivers: net: nsos: update unwatched file descriptor with poll()
zsock_poll_internal() iterates through all fds to call
ZFD_IOCTL_POLL_UPDATE on them. In cases when -EAGAIN is returned from one
of such syscalls (which happens for example for TLS sockets when in the
middle of a TLS handshake) whole fds array is iterated once again. This
means that ZFD_IOCTL_POLL_UPDATE can be called more than once for a single
preceding ZFD_IOCTL_POLL_PREPARE operation. This resulted in error in
nsos_adapt_poll_remove() call, which was not intended to be called twice.

In case ZFD_IOCTL_POLL_UPDATE is called second time, update 'revents' just
by calling poll() syscall on the host (Linux) side with 0 timeout.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-04-10 11:30:04 -04:00
..
CMakeLists.txt drivers: net: nsos: implement poll() syscall 2024-03-22 14:39:27 +01:00
Kconfig drivers: net: ppp: Add packet capture support 2024-04-04 17:02:11 +02:00
canbus.c
loopback.c
nsos.h drivers: net: nsos: update unwatched file descriptor with poll() 2024-04-10 11:30:04 -04:00
nsos_adapt.c drivers: net: nsos: update unwatched file descriptor with poll() 2024-04-10 11:30:04 -04:00
nsos_errno.c drivers: net: nsos: new driver for Native Simulator offloaded sockets 2024-03-22 14:39:27 +01:00
nsos_errno.h drivers: net: nsos: new driver for Native Simulator offloaded sockets 2024-03-22 14:39:27 +01:00
nsos_fcntl.c drivers: net: nsos: add F_GETFL and F_SETFL support 2024-03-22 14:39:27 +01:00
nsos_fcntl.h drivers: net: nsos: add F_GETFL and F_SETFL support 2024-03-22 14:39:27 +01:00
nsos_netdb.c drivers: net: nsos: add DNS offload support 2024-03-22 14:39:27 +01:00
nsos_netdb.h drivers: net: nsos: add DNS offload support 2024-03-22 14:39:27 +01:00
nsos_sockets.c drivers: net: nsos: update unwatched file descriptor with poll() 2024-04-10 11:30:04 -04:00
ppp.c drivers: net: use sys_rand8_get 2024-04-05 12:28:46 +02:00
slip.c drivers: net: use sys_rand8_get 2024-04-05 12:28:46 +02:00
slip.h