Home
last modified time | relevance | path

Searched refs:pfd (Results 1 – 18 of 18) sorted by relevance

/Zephyr-latest/lib/os/zvfs/
Dzvfs_poll.c25 struct zvfs_pollfd *pfd; in zvfs_poll_internal() local
39 for (pfd = fds, i = nfds; i--; pfd++) { in zvfs_poll_internal()
44 if (pfd->fd < 0) { in zvfs_poll_internal()
48 ctx = zvfs_get_fd_obj_and_vtable(pfd->fd, &vtable, &lock); in zvfs_poll_internal()
56 result = zvfs_fdtable_call_ioctl(vtable, ctx, ZFD_IOCTL_POLL_PREPARE, pfd, &pev, in zvfs_poll_internal()
120 for (pfd = fds, i = nfds; i--; pfd++) { in zvfs_poll_internal()
124 pfd->revents = 0; in zvfs_poll_internal()
126 if (pfd->fd < 0) { in zvfs_poll_internal()
130 ctx = zvfs_get_fd_obj_and_vtable(pfd->fd, &vtable, &lock); in zvfs_poll_internal()
132 pfd->revents = ZVFS_POLLNVAL; in zvfs_poll_internal()
[all …]
Dzvfs_eventfd.c51 struct zsock_pollfd *pfd, in zvfs_eventfd_poll_prepare() argument
55 if (pfd->events & ZSOCK_POLLIN) { in zvfs_eventfd_poll_prepare()
68 if (pfd->events & ZSOCK_POLLOUT) { in zvfs_eventfd_poll_prepare()
85 struct zsock_pollfd *pfd, in zvfs_eventfd_poll_update() argument
88 if (pfd->events & ZSOCK_POLLIN) { in zvfs_eventfd_poll_update()
89 pfd->revents |= ZSOCK_POLLIN * (efd->cnt > 0); in zvfs_eventfd_poll_update()
93 if (pfd->events & ZSOCK_POLLOUT) { in zvfs_eventfd_poll_update()
94 pfd->revents |= ZSOCK_POLLOUT * (efd->cnt < UINT64_MAX - 1); in zvfs_eventfd_poll_update()
259 struct zsock_pollfd *pfd; in zvfs_eventfd_ioctl_op() local
263 pfd = va_arg(args, struct zsock_pollfd *); in zvfs_eventfd_ioctl_op()
[all …]
/Zephyr-latest/tests/posix/eventfd/src/
D_main.c19 struct pollfd pfd; in is_blocked() local
22 pfd.fd = fd; in is_blocked()
23 pfd.events = *event; in is_blocked()
25 ret = poll(&pfd, 1, 0); in is_blocked()
28 *event = pfd.revents; in is_blocked()
Dblocking.c53 struct pollfd pfd; in ZTEST_F() local
56 pfd.fd = fixture->fd; in ZTEST_F()
57 pfd.events = POLLIN; in ZTEST_F()
59 ret = poll(&pfd, 1, 500); in ZTEST_F()
/Zephyr-latest/subsys/net/lib/sockets/
Dsocketpair.c752 struct zsock_pollfd *const pfd, in zsock_poll_prepare_ctx() argument
761 if (pfd->events & ZSOCK_POLLIN) { in zsock_poll_prepare_ctx()
778 if (pfd->events & ZSOCK_POLLOUT) { in zsock_poll_prepare_ctx()
826 struct zsock_pollfd *const pfd, in zsock_poll_update_ctx() argument
835 if (pfd->events & ZSOCK_POLLOUT) { in zsock_poll_update_ctx()
837 pfd->revents |= ZSOCK_POLLHUP; in zsock_poll_update_ctx()
855 pfd->revents |= ZSOCK_POLLOUT; in zsock_poll_update_ctx()
869 pfd->revents |= ZSOCK_POLLHUP; in zsock_poll_update_ctx()
875 if (pfd->events & ZSOCK_POLLIN) { in zsock_poll_update_ctx()
877 pfd->revents |= ZSOCK_POLLIN; in zsock_poll_update_ctx()
[all …]
Dsockets_tls.c2995 struct zsock_pollfd *pfd, in ztls_poll_prepare_ctx() argument
3003 short events = pfd->events; in ztls_poll_prepare_ctx()
3008 if ((pfd->events & ZSOCK_POLLIN) && (ctx->type == SOCK_DGRAM) && in ztls_poll_prepare_ctx()
3020 pfd->events &= ~ZSOCK_POLLIN; in ztls_poll_prepare_ctx()
3033 pfd, pev, pev_end); in ztls_poll_prepare_ctx()
3038 if (pfd->events & ZSOCK_POLLIN) { in ztls_poll_prepare_ctx()
3044 pfd->events = events; in ztls_poll_prepare_ctx()
3145 struct zsock_pollfd *pfd) in ztls_poll_update_pollin() argument
3152 pfd->revents |= ZSOCK_POLLIN; in ztls_poll_update_pollin()
3158 if (!(pfd->revents & ZSOCK_POLLIN)) { in ztls_poll_update_pollin()
[all …]
Dsockets_inet.c1513 struct zsock_pollfd *pfd, in zsock_poll_prepare_ctx() argument
1517 if (pfd->events & ZSOCK_POLLIN) { in zsock_poll_prepare_ctx()
1529 if (pfd->events & ZSOCK_POLLOUT) { in zsock_poll_prepare_ctx()
1564 struct zsock_pollfd *pfd, in zsock_poll_update_ctx() argument
1569 if (pfd->events & ZSOCK_POLLIN) { in zsock_poll_update_ctx()
1571 pfd->revents |= ZSOCK_POLLIN; in zsock_poll_update_ctx()
1575 if (pfd->events & ZSOCK_POLLOUT) { in zsock_poll_update_ctx()
1582 pfd->revents |= ZSOCK_POLLOUT; in zsock_poll_update_ctx()
1586 pfd->revents |= ZSOCK_POLLOUT; in zsock_poll_update_ctx()
1591 pfd->revents |= ZSOCK_POLLERR; in zsock_poll_update_ctx()
[all …]
/Zephyr-latest/drivers/modem/
Dmodem_socket.c342 struct zsock_pollfd *pfd, struct k_poll_event **pev, in modem_socket_poll_prepare() argument
345 if (pfd->events & ZSOCK_POLLIN) { in modem_socket_poll_prepare()
356 if (pfd->events & ZSOCK_POLLOUT) { in modem_socket_poll_prepare()
369 int modem_socket_poll_update(struct modem_socket *sock, struct zsock_pollfd *pfd, in modem_socket_poll_update() argument
374 if (pfd->events & ZSOCK_POLLIN) { in modem_socket_poll_update()
376 pfd->revents |= ZSOCK_POLLIN; in modem_socket_poll_update()
381 if (pfd->events & ZSOCK_POLLOUT) { in modem_socket_poll_update()
385 pfd->revents |= ZSOCK_POLLOUT; in modem_socket_poll_update()
Dmodem_socket.h82 int modem_socket_poll_update(struct modem_socket *sock, struct zsock_pollfd *pfd,
85 struct zsock_pollfd *pfd, struct k_poll_event **pev,
Dquectel-bg9x.c658 struct zsock_pollfd *pfd; in offload_ioctl() local
662 pfd = va_arg(args, struct zsock_pollfd *); in offload_ioctl()
666 return modem_socket_poll_prepare(&mdata.socket_config, obj, pfd, pev, pev_end); in offload_ioctl()
669 struct zsock_pollfd *pfd; in offload_ioctl() local
672 pfd = va_arg(args, struct zsock_pollfd *); in offload_ioctl()
675 return modem_socket_poll_update(obj, pfd, pev); in offload_ioctl()
Dublox-sara-r4.c1716 struct zsock_pollfd *pfd; in offload_ioctl() local
1720 pfd = va_arg(args, struct zsock_pollfd *); in offload_ioctl()
1724 return modem_socket_poll_prepare(&mdata.socket_config, obj, pfd, pev, pev_end); in offload_ioctl()
1727 struct zsock_pollfd *pfd; in offload_ioctl() local
1730 pfd = va_arg(args, struct zsock_pollfd *); in offload_ioctl()
1733 return modem_socket_poll_update(obj, pfd, pev); in offload_ioctl()
/Zephyr-latest/modules/thrift/src/thrift/server/
DTFDServer.cpp83 for (auto &pfd : pollfds) { in read_virt() local
84 if (pfd.revents & POLLNVAL) { in read_virt()
85 LOG_DBG("fd %d is invalid", pfd.fd); in read_virt()
/Zephyr-latest/drivers/serial/
Duart_native_ptty_bottom.c85 struct pollfd pfd = { .fd = fd, .events = POLLHUP }; in np_uart_slave_connected() local
88 ret = poll(&pfd, 1, 0); in np_uart_slave_connected()
102 if (!(pfd.revents & POLLHUP)) { in np_uart_slave_connected()
Duart_native_tty_bottom.c180 struct pollfd pfd = { .fd = fd, .events = POLLIN }; in native_tty_poll_bottom() local
182 return poll(&pfd, 1, 0); in native_tty_poll_bottom()
/Zephyr-latest/drivers/net/
Dnsos_sockets.c288 static int nsos_poll_prepare(struct nsos_socket *sock, struct zsock_pollfd *pfd, in nsos_poll_prepare() argument
295 poll->mid.events = pfd->events; in nsos_poll_prepare()
325 static int nsos_poll_update(struct nsos_socket *sock, struct zsock_pollfd *pfd, in nsos_poll_update() argument
349 pfd->revents = flags; in nsos_poll_update()
360 struct zsock_pollfd *pfd; in nsos_ioctl() local
364 pfd = va_arg(args, struct zsock_pollfd *); in nsos_ioctl()
368 return nsos_poll_prepare(obj, pfd, pev, pev_end, &sock->poll); in nsos_ioctl()
372 struct zsock_pollfd *pfd; in nsos_ioctl() local
375 pfd = va_arg(args, struct zsock_pollfd *); in nsos_ioctl()
378 return nsos_poll_update(obj, pfd, pev, &sock->poll); in nsos_ioctl()
[all …]
/Zephyr-latest/samples/net/sockets/echo_service/src/
Dmain.c62 struct pollfd *pfd = &pev->event; in receive_data() local
63 int client = pfd->fd; in receive_data()
/Zephyr-latest/subsys/net/lib/http/
Dhttp_client.c39 struct zsock_pollfd pfd; in sendall() local
45 pfd.fd = sock; in sendall()
46 pfd.events = ZSOCK_POLLOUT; in sendall()
47 pollres = zsock_poll(&pfd, 1, req_timeout_ms); in sendall()
/Zephyr-latest/subsys/net/lib/websocket/
Dwebsocket.c561 struct zsock_pollfd pfd; in sendmsg_all() local
567 pfd.fd = sock; in sendmsg_all()
568 pfd.events = ZSOCK_POLLOUT; in sendmsg_all()
569 pollres = zsock_poll(&pfd, 1, req_timeout_ms); in sendmsg_all()