Home
last modified time | relevance | path

Searched refs:maxfd (Results 1 – 10 of 10) sorted by relevance

/openbmc/linux/tools/power/acpi/tools/acpidbg/
H A Dacpidbg.c115 static int acpi_aml_set_fd(int fd, int maxfd, fd_set *set) in acpi_aml_set_fd() argument
117 if (fd > maxfd) in acpi_aml_set_fd()
118 maxfd = fd; in acpi_aml_set_fd()
120 return maxfd; in acpi_aml_set_fd()
271 int maxfd = 0; in acpi_aml_loop() local
290 maxfd = acpi_aml_set_fd(STDIN_FILENO, maxfd, &rfds); in acpi_aml_loop()
298 maxfd = acpi_aml_set_fd(fd, maxfd, &wfds); in acpi_aml_loop()
302 maxfd = acpi_aml_set_fd(fd, maxfd, &rfds); in acpi_aml_loop()
304 maxfd = acpi_aml_set_fd(STDOUT_FILENO, maxfd, &wfds); in acpi_aml_loop()
306 ret = select(maxfd+1, &rfds, &wfds, NULL, &tv); in acpi_aml_loop()
[all …]
/openbmc/qemu/contrib/ivshmem-client/
H A Divshmem-client.c272 ivshmem_client_get_fds(const IvshmemClient *client, fd_set *fds, int *maxfd) in ivshmem_client_get_fds() argument
278 if (client->sock_fd >= *maxfd) { in ivshmem_client_get_fds()
279 *maxfd = client->sock_fd + 1; in ivshmem_client_get_fds()
285 if (fd >= *maxfd) { in ivshmem_client_get_fds()
286 *maxfd = fd + 1; in ivshmem_client_get_fds()
293 ivshmem_client_handle_event(IvshmemClient *client, const fd_set *cur, int maxfd) in ivshmem_client_handle_event() argument
303 if (peer->vectors[i] >= maxfd || !FD_ISSET(peer->vectors[i], cur)) { in ivshmem_client_handle_event()
328 ivshmem_client_handle_fds(IvshmemClient *client, fd_set *fds, int maxfd) in ivshmem_client_handle_fds() argument
330 if (client->sock_fd < maxfd && FD_ISSET(client->sock_fd, fds) && in ivshmem_client_handle_fds()
335 } else if (ivshmem_client_handle_event(client, fds, maxfd) < 0 && in ivshmem_client_handle_fds()
H A Dmain.c136 int ret, maxfd; in ivshmem_client_poll_events() local
142 maxfd = 1; in ivshmem_client_poll_events()
144 ivshmem_client_get_fds(client, &fds, &maxfd); in ivshmem_client_poll_events()
146 ret = select(maxfd, &fds, NULL, NULL, NULL); in ivshmem_client_poll_events()
165 if (ivshmem_client_handle_fds(client, &fds, maxfd) < 0) { in ivshmem_client_poll_events()
H A Divshmem-client.h134 int *maxfd);
150 int ivshmem_client_handle_fds(IvshmemClient *client, fd_set *fds, int maxfd);
/openbmc/qemu/contrib/ivshmem-server/
H A Dmain.c150 int ret = 0, maxfd; in ivshmem_server_poll_events() local
155 maxfd = 0; in ivshmem_server_poll_events()
156 ivshmem_server_get_fds(server, &fds, &maxfd); in ivshmem_server_poll_events()
158 ret = select(maxfd, &fds, NULL, NULL, NULL); in ivshmem_server_poll_events()
172 if (ivshmem_server_handle_fds(server, &fds, maxfd) < 0) { in ivshmem_server_poll_events()
H A Divshmem-server.c387 ivshmem_server_get_fds(const IvshmemServer *server, fd_set *fds, int *maxfd) in ivshmem_server_get_fds() argument
396 if (server->sock_fd >= *maxfd) { in ivshmem_server_get_fds()
397 *maxfd = server->sock_fd + 1; in ivshmem_server_get_fds()
402 if (peer->sock_fd >= *maxfd) { in ivshmem_server_get_fds()
403 *maxfd = peer->sock_fd + 1; in ivshmem_server_get_fds()
410 ivshmem_server_handle_fds(IvshmemServer *server, fd_set *fds, int maxfd) in ivshmem_server_handle_fds() argument
414 if (server->sock_fd < maxfd && FD_ISSET(server->sock_fd, fds) && in ivshmem_server_handle_fds()
424 if (peer->sock_fd < maxfd && FD_ISSET(peer->sock_fd, fds)) { in ivshmem_server_handle_fds()
H A Divshmem-server.h128 ivshmem_server_get_fds(const IvshmemServer *server, fd_set *fds, int *maxfd);
143 int ivshmem_server_handle_fds(IvshmemServer *server, fd_set *fds, int maxfd);
/openbmc/qemu/tests/qtest/
H A Divshmem-test.c257 int maxfd, ret; in server_thread() local
261 maxfd = t->pipe[0] + 1; in server_thread()
263 ivshmem_server_get_fds(server, &fds, &maxfd); in server_thread()
265 ret = select(maxfd, &fds, NULL, NULL, NULL); in server_thread()
283 if (ivshmem_server_handle_fds(server, &fds, maxfd) < 0) { in server_thread()
/openbmc/linux/fs/
H A Dfile.c466 unsigned int maxfd = fdt->max_fds; /* always multiple of BITS_PER_LONG */ in find_next_fd() local
467 unsigned int maxbit = maxfd / BITS_PER_LONG; in find_next_fd()
471 if (bitbit >= maxfd) in find_next_fd()
472 return maxfd; in find_next_fd()
475 return find_next_zero_bit(fdt->open_fds, maxfd, start); in find_next_fd()
/openbmc/qemu/linux-user/
H A Dsyscall.c9358 abi_long fd, maxfd; in _syscall2()
9359 maxfd = MIN(arg2, target_fd_max); in _syscall2()
9360 for (fd = arg1; fd < maxfd; fd++) { in _syscall2()
9355 abi_long fd, maxfd; _syscall2() local