| /openbmc/libmctp/utils/ |
| H A D | mctp-pipe.c | 32 struct pollfd pollfds[3]; in main() local 60 pollfds[0].fd = mctp_fds[0]; in main() 61 pollfds[0].events = POLLIN; in main() 62 pollfds[1].fd = mctp_fds[1]; in main() 63 pollfds[1].events = POLLIN; in main() 64 pollfds[2].fd = STDIN_FILENO; in main() 65 pollfds[2].events = POLLIN; in main() 71 rc = poll(pollfds, n, -1); in main() 75 if (pollfds[0].revents) { in main() 78 pollfds[0].fd = -1; in main() [all …]
|
| H A D | mctp-astlpc-daemon.c | 75 struct pollfd pollfds[2]; in main() 77 pollfds[0].fd = STDIN_FILENO; in main() 78 pollfds[0].events = POLLIN; in main() 80 mctp_astlpc_init_pollfd(astlpc, &pollfds[1]); in main() 82 rc = poll(pollfds, 2, -1); in main() 86 if (pollfds[0].revents) { in main() 96 if (pollfds[1].revents) { in main()
|
| H A D | mctp-demux-daemon.c | 73 struct pollfd *pollfds; member 466 ctx->pollfds = malloc(FD_NR * sizeof(struct pollfd)); in run_daemon() 469 ctx->pollfds[FD_BINDING].fd = -1; in run_daemon() 470 ctx->pollfds[FD_BINDING].events = 0; in run_daemon() 483 ctx->pollfds[FD_SIGNAL].fd = signalfd(-1, &mask, 0); in run_daemon() 484 ctx->pollfds[FD_SIGNAL].events = POLLIN; in run_daemon() 486 ctx->pollfds[FD_SOCKET].fd = ctx->sock; in run_daemon() 487 ctx->pollfds[FD_SOCKET].events = POLLIN; in run_daemon() 495 ctx->pollfds = realloc(ctx->pollfds, in run_daemon() 500 ctx->pollfds[FD_NR + i].fd = in run_daemon() [all …]
|
| /openbmc/qemu/util/ |
| H A D | fdmon-poll.c | 24 static __thread GPollFD *pollfds; variable 32 g_free(pollfds); in pollfds_cleanup() 48 pollfds = g_renew(GPollFD, pollfds, nalloc); in add_pollfd() 52 pollfds[npfd] = (GPollFD) { in add_pollfd() 80 npfd = 0; /* we won't need pollfds[], reset npfd */ in fdmon_poll_wait() 84 ret = qemu_poll_ns(pollfds, npfd, timeout); in fdmon_poll_wait() 89 int revents = pollfds[i].revents; in fdmon_poll_wait()
|
| H A D | main-loop.c | 413 static int pollfds_fill(GArray *pollfds, fd_set *rfds, fd_set *wfds, 419 for (i = 0; i < pollfds->len; i++) { 420 GPollFD *pfd = &g_array_index(pollfds, GPollFD, i); 439 static void pollfds_poll(GArray *pollfds, int nfds, fd_set *rfds, 444 for (i = 0; i < pollfds->len; i++) { 445 GPollFD *pfd = &g_array_index(pollfds, GPollFD, i); 568 .pollfds = gpollfds, in main_loop_wait()
|
| /openbmc/obmc-console/ |
| H A D | console-client.c | 271 struct pollfd pollfds[2]; in main() local 352 pollfds[0].fd = client->fd_in; in main() 353 pollfds[0].events = POLLIN; in main() 354 pollfds[1].fd = client->console_sd; in main() 355 pollfds[1].events = POLLIN; in main() 357 rc = poll(pollfds, 2, -1); in main() 363 if (pollfds[0].revents) { in main() 367 if (prc == PROCESS_OK && pollfds[1].revents) { in main()
|
| H A D | console-server.c | 75 struct pollfd *p = &server->pollfds[i]; in console_server_find_released_pollfd() 96 struct pollfd *newarr = reallocarray(server->pollfds, newcap, in console_server_request_pollfd() 101 server->pollfds = newarr; in console_server_request_pollfd() 108 pollfd = &server->pollfds[index]; in console_server_request_pollfd() 123 struct pollfd *pfd = &server->pollfds[pollfd_index]; in console_server_release_pollfd() 825 console->server->pollfds[poller->pollfd_index].events = in console_poller_set_events() 894 pollfd = &console->server->pollfds[poller->pollfd_index]; in call_pollers() 1000 rc = poll(server->pollfds, server->capacity_pollfds, (int)timeout); in run_console_iteration() 1016 if (server->pollfds[server->tty_pollfd_index].revents) { in run_console_iteration() 1031 &(server->pollfds[server->dbus_pollfd_index]); in run_console_iteration() [all …]
|
| H A D | console-server.h | 122 struct pollfd *pollfds; member
|
| /openbmc/inarp/ |
| H A D | inarp.c | 466 struct pollfd pollfds[2]; in main() local 468 pollfds[0].fd = inarp.arp_sd; in main() 469 pollfds[0].events = POLLIN; in main() 470 pollfds[1].fd = inarp.nl_sd; in main() 471 pollfds[1].events = POLLIN; in main() 473 ret = poll(pollfds, 2, -1); in main() 479 if (pollfds[0].revents) in main() 482 if (pollfds[1].revents) in main()
|
| /openbmc/qemu/net/ |
| H A D | slirp.c | 331 GArray *pollfds = opaque; in net_slirp_add_poll() 336 int idx = pollfds->len; in slirp_gio_to_poll() 337 g_array_append_val(pollfds, pfd); in slirp_gio_to_poll() 366 GArray *pollfds = opaque; in net_slirp_poll_notify() 368 return slirp_gio_to_poll(g_array_index(pollfds, GPollFD, idx).revents); in net_slirp_poll_notify() 379 net_slirp_add_poll, poll->pollfds); in net_slirp_poll_notify() 384 net_slirp_get_revents, poll->pollfds); in net_slirp_poll_notify() 326 GArray *pollfds = opaque; net_slirp_add_poll() local 361 GArray *pollfds = opaque; net_slirp_get_revents() local
|
| /openbmc/qemu/include/qemu/ |
| H A D | main-loop.h | 446 GArray *pollfds; 428 GArray *pollfds; global() member
|
| /openbmc/docs/designs/mctp/ |
| H A D | mctp-kernel.md | 587 struct pollfd pollfds[1]; 618 pollfds[0].fd = sd; 619 pollfds[0].events = POLLIN; 627 rc = poll(pollfds, 1, timeout) 636 if (!(pollfds[0].revents & POLLIN))
|