Home
last modified time | relevance | path

Searched refs:nfds (Results 1 - 25 of 31) sorted by relevance

12

/kernel/liteos_m/kal/posix/src/
H A Dpoll.c91 STATIC INT32 QueryFds(struct pollfd *fds, nfds_t nfds, struct PollTable *table) in QueryFds() argument
97 if (((nfds != 0) && (fds == NULL)) || (table == NULL)) { in QueryFds()
102 for (i = 0; i < nfds; i++) { in QueryFds()
157 STATIC INLINE INT32 PollTimedWait(struct pollfd *fds, nfds_t nfds, struct PollTable *table, INT32 timeout) in PollTimedWait() argument
194 count = QueryFds(fds, nfds, table); in PollTimedWait()
200 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
212 count = QueryFds(fds, nfds, &table); in poll()
223 count = PollTimedWait(fds, nfds, &table, timeout); in poll()
/kernel/linux/linux-6.6/tools/thermal/lib/
H A Dmainloop.c27 int i, nfds; in mainloop() local
36 nfds = epoll_wait(epfd, events, MAX_EVENTS, timeout); in mainloop()
38 if (exit_mainloop || !nfds) in mainloop()
41 if (nfds < 0) { in mainloop()
47 for (i = 0; i < nfds; i++) { in mainloop()
/kernel/linux/linux-5.10/tools/perf/bench/
H A Depoll-ctl.c60 static unsigned int nfds = 64; variable
77 OPT_UINTEGER('f', "nfds", &nfds, "Specify amount of file descriptors to monitor for each thread"),
165 fd = w->fdmap[rnd1 % nfds]; in do_random_epoll_op()
191 for (i = 0; i < nfds; i++) { in workerfn()
214 for (i = 0; i < nfds; i+=inc) { in init_fdmaps()
237 w->fdmap = calloc(nfds, sizeof(int)); in do_threads()
241 for (j = 0; j < nfds; j++) { in do_threads()
345 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl()
353 getpid(), nthreads, nfds, nsec in bench_epoll_ctl()
[all...]
H A Depoll-wait.c111 static unsigned int nfds = 64; variable
130 OPT_UINTEGER('f', "nfds", &nfds, "Specify amount of file descriptors to monitor for each thread"),
323 w->fdmap = calloc(nfds, sizeof(int)); in do_threads()
327 for (j = 0; j < nfds; j++) { in do_threads()
388 shuffle((void *)w->fdmap, nfds, sizeof(int)); in writerfn()
391 for (j = 0; j < nfds; j++) { in writerfn()
465 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait()
473 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait()
527 if (nfds in bench_epoll_wait()
[all...]
/kernel/linux/linux-6.6/tools/perf/bench/
H A Depoll-ctl.c60 static unsigned int nfds = 64; variable
77 OPT_UINTEGER('f', "nfds", &nfds, "Specify amount of file descriptors to monitor for each thread"),
165 fd = w->fdmap[rnd1 % nfds]; in do_random_epoll_op()
191 for (i = 0; i < nfds; i++) { in workerfn()
214 for (i = 0; i < nfds; i+=inc) { in init_fdmaps()
244 w->fdmap = calloc(nfds, sizeof(int)); in do_threads()
248 for (j = 0; j < nfds; j++) { in do_threads()
358 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_ctl()
366 getpid(), nthreads, nfds, nsec in bench_epoll_ctl()
[all...]
H A Depoll-wait.c111 static unsigned int nfds = 64; variable
130 OPT_UINTEGER('f', "nfds", &nfds, "Specify amount of file descriptors to monitor for each thread"),
330 w->fdmap = calloc(nfds, sizeof(int)); in do_threads()
334 for (j = 0; j < nfds; j++) { in do_threads()
401 shuffle((void *)w->fdmap, nfds, sizeof(int)); in writerfn()
404 for (j = 0; j < nfds; j++) { in writerfn()
478 rl.rlim_cur = rl.rlim_max = nfds * nthreads * 2 + 50; in bench_epoll_wait()
486 getpid(), nthreads, oneshot ? " (EPOLLONESHOT semantics)": "", nfds, nsecs); in bench_epoll_wait()
540 if (nfds in bench_epoll_wait()
[all...]
/kernel/linux/linux-5.10/fs/
H A Dselect.c15 * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
973 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, in do_sys_poll() argument
984 unsigned long todo = nfds; in do_sys_poll()
986 if (nfds > rlimit(RLIMIT_NOFILE)) in do_sys_poll()
989 len = min_t(unsigned int, nfds, N_STACK_PPS); in do_sys_poll()
996 if (copy_from_user(walk->entries, ufds + nfds-todo, in do_sys_poll()
1017 if (!user_write_access_begin(ufds, nfds * sizeof(*ufds))) in do_sys_poll()
1049 int nfds = restart_block->poll.nfds; in do_restart_poll() local
1059 ret = do_sys_poll(ufds, nfds, t in do_restart_poll()
[all...]
/kernel/linux/linux-6.6/fs/
H A Dselect.c15 * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
974 static int do_sys_poll(struct pollfd __user *ufds, unsigned int nfds, in do_sys_poll() argument
985 unsigned long todo = nfds; in do_sys_poll()
987 if (nfds > rlimit(RLIMIT_NOFILE)) in do_sys_poll()
990 len = min_t(unsigned int, nfds, N_STACK_PPS); in do_sys_poll()
997 if (copy_from_user(walk->entries, ufds + nfds-todo, in do_sys_poll()
1018 if (!user_write_access_begin(ufds, nfds * sizeof(*ufds))) in do_sys_poll()
1050 int nfds = restart_block->poll.nfds; in do_restart_poll() local
1060 ret = do_sys_poll(ufds, nfds, t in do_restart_poll()
[all...]
/kernel/linux/linux-5.10/tools/testing/vsock/
H A Dutil.c53 int epollfd, nfds; in vsock_wait_remote_close() local
68 nfds = epoll_wait(epollfd, &ev, 1, TIMEOUT * 1000); in vsock_wait_remote_close()
69 if (nfds == -1) { in vsock_wait_remote_close()
74 if (nfds == 0) { in vsock_wait_remote_close()
79 assert(nfds == 1); in vsock_wait_remote_close()
/kernel/liteos_a/syscall/
H A Dfs_syscall.c180 static int PollfdToSystem(struct pollfd *fds, nfds_t nfds, int **pollFdsBak) in PollfdToSystem() argument
182 if ((nfds != 0 && fds == NULL) || (pollFdsBak == NULL)) { in PollfdToSystem()
186 if (nfds == 0) { in PollfdToSystem()
189 int *pollFds = (int *)malloc(sizeof(int) * nfds); in PollfdToSystem()
194 for (int i = 0; i < nfds; ++i) { in PollfdToSystem()
208 static void RestorePollfd(struct pollfd *fds, nfds_t nfds, const int *pollFds) in RestorePollfd() argument
213 for (int i = 0; i < nfds; ++i) { in RestorePollfd()
219 static int UserPoll(struct pollfd *fds, nfds_t nfds, int timeout) in UserPoll() argument
222 int ret = PollfdToSystem(fds, nfds, &pollFds); in UserPoll()
227 ret = poll(fds, nfds, timeou in UserPoll()
1147 SysSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout) SysSelect() argument
1552 SysPoll(struct pollfd *fds, nfds_t nfds, int timeout) SysPoll() argument
2657 SysPpoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p, const sigset_t *sigMask, int nsig) SysPpoll() argument
2691 SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, const struct timespec *timeout, const long data[2]) SysPselect6() argument
[all...]
H A Dlos_syscall.h214 typedef int (*PollFun)(struct pollfd *fds, nfds_t nfds, int timeout);
221 extern int do_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
265 extern int SysSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval *timeout);
266 extern int SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
287 extern int SysPoll(struct pollfd *fds, nfds_t nfds, int timeout);
288 extern int SysPpoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p,
/kernel/linux/linux-6.6/tools/testing/vsock/
H A Dutil.c53 int epollfd, nfds; in vsock_wait_remote_close() local
68 nfds = epoll_wait(epollfd, &ev, 1, TIMEOUT * 1000); in vsock_wait_remote_close()
69 if (nfds == -1) { in vsock_wait_remote_close()
74 if (nfds == 0) { in vsock_wait_remote_close()
79 assert(nfds == 1); in vsock_wait_remote_close()
/kernel/liteos_a/testsuites/unittest/libc/io/full/
H A DIt_stdlib_poll_003.cpp34 int nfds; member
45 struct PollParam pollParam[4] = { /* nfds timeout ret err */ in Testcase()
62 ret = poll(&pollFd, pollParam[i].nfds, pollParam[i].timeout); in Testcase()
/kernel/linux/linux-6.6/tools/include/nolibc/
H A Dsys.h828 * int poll(struct pollfd *fds, int nfds, int timeout);
832 int sys_poll(struct pollfd *fds, int nfds, int timeout) in sys_poll() argument
841 return my_syscall5(__NR_ppoll, fds, nfds, (timeout >= 0) ? &t : NULL, NULL, 0); in sys_poll()
843 return my_syscall3(__NR_poll, fds, nfds, timeout); in sys_poll()
850 int poll(struct pollfd *fds, int nfds, int timeout) in poll() argument
852 return __sysret(sys_poll(fds, nfds, timeout)); in poll()
909 * int select(int nfds, fd_set *read_fds, fd_set *write_fds,
914 int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) in sys_select() argument
921 } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout }; in sys_select()
930 return my_syscall6(__NR_pselect6, nfds, rfd in sys_select()
942 select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) select() argument
[all...]
/kernel/linux/linux-5.10/tools/include/nolibc/
H A Dnolibc.h1636 int sys_poll(struct pollfd *fds, int nfds, int timeout) in sys_poll() argument
1638 return my_syscall3(__NR_poll, fds, nfds, timeout); in sys_poll()
1660 int sys_select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) in sys_select() argument
1667 } arg = { .n = nfds, .r = rfds, .w = wfds, .e = efds, .t = timeout }; in sys_select()
1676 return my_syscall6(__NR_pselect6, nfds, rfds, wfds, efds, timeout ? &t : NULL, NULL); in sys_select()
1681 return my_syscall5(__NR__newselect, nfds, rfds, wfds, efds, timeout); in sys_select()
2073 int poll(struct pollfd *fds, int nfds, int timeout) in poll() argument
2075 int ret = sys_poll(fds, nfds, timeout); in poll()
2134 int select(int nfds, fd_set *rfds, fd_set *wfds, fd_set *efds, struct timeval *timeout) in select() argument
2136 int ret = sys_select(nfds, rfd in select()
[all...]
/kernel/liteos_m/kal/libc/newlib/porting/include/
H A Dpoll.h56 int poll(struct pollfd *fds, nfds_t nfds, int timeout);
/kernel/linux/linux-5.10/tools/lib/perf/
H A Devlist.c293 int nfds = 0; in perf_evlist__alloc_pollfd() local
298 nfds += nr_cpus; in perf_evlist__alloc_pollfd()
300 nfds += nr_cpus * nr_threads; in perf_evlist__alloc_pollfd()
303 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd()
304 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd()
/kernel/linux/linux-6.6/tools/lib/perf/
H A Devlist.c323 int nfds = 0; in perf_evlist__alloc_pollfd() local
328 nfds += nr_cpus; in perf_evlist__alloc_pollfd()
330 nfds += nr_cpus * nr_threads; in perf_evlist__alloc_pollfd()
333 if (fdarray__available_entries(&evlist->pollfd) < nfds && in perf_evlist__alloc_pollfd()
334 fdarray__grow(&evlist->pollfd, nfds) < 0) in perf_evlist__alloc_pollfd()
/kernel/linux/linux-5.10/include/linux/
H A Drestart_block.h50 int nfds; member
/kernel/linux/linux-6.6/include/linux/
H A Drestart_block.h51 int nfds; member
/kernel/linux/linux-5.10/tools/testing/selftests/x86/
H A Dtest_syscall_vdso.c171 int nfds; variable
184 nfds = 42; in prep_args()
258 " mov nfds, %%ebx\n" /* ebx arg1 */ in run_syscall()
271 " cmp nfds, %%ebx\n" /* ebx arg1 */ in run_syscall()
/kernel/linux/linux-6.6/tools/testing/selftests/x86/
H A Dtest_syscall_vdso.c171 int nfds; variable
184 nfds = 42; in prep_args()
258 " mov nfds, %%ebx\n" /* ebx arg1 */ in run_syscall()
271 " cmp nfds, %%ebx\n" /* ebx arg1 */ in run_syscall()
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
H A Dnet_socket_test_009.cpp138 static int HandleReadfds(struct pollfd *fds, int nfds, int lsfd) in HandleReadfds() argument
141 for (int i = 0; i < nfds; ++i) { in HandleReadfds()
/kernel/liteos_m/components/net/lwip-2.1/porting/src/
H A Dsockets_porting.c253 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
255 return lwip_poll(fds, nfds, timeout); in poll()
/kernel/uniproton/src/net/lwip-2.1/src/
H A Dsockets.c245 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
247 return lwip_poll(fds, nfds, timeout); in poll()

Completed in 23 milliseconds

12