Home
last modified time | relevance | path

Searched refs:nfds (Results 1 – 23 of 23) sorted by relevance

/kernel/liteos_m/kal/posix/src/
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 t… 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-5.10/tools/perf/bench/
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, nsecs); in bench_epoll_ctl()
397 if (nfds == 1) in bench_epoll_ctl()
[all …]
Depoll-wait.c111 static unsigned int nfds = 64; variable
130 …OPT_UINTEGER('f', "nfds", &nfds, "Specify amount of file descriptors to monitor for each threa…
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 == 1) in bench_epoll_wait()
533 &worker[i].fdmap[nfds-1], t); in bench_epoll_wait()
/kernel/linux/linux-5.10/fs/
Dselect.c973 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, to); in do_restart_poll()
1067 SYSCALL_DEFINE3(poll, struct pollfd __user *, ufds, unsigned int, nfds, in SYSCALL_DEFINE3() argument
1079 ret = do_sys_poll(ufds, nfds, to); in SYSCALL_DEFINE3()
[all …]
/kernel/linux/linux-5.10/tools/testing/vsock/
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/
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, timeout); in UserPoll()
[all …]
Dlos_syscall.h208 typedef int (*PollFun)(struct pollfd *fds, nfds_t nfds, int timeout);
215 extern int do_select(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
259 extern int SysSelect(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct timeval…
260 extern int SysPselect6(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds,
281 extern int SysPoll(struct pollfd *fds, nfds_t nfds, int timeout);
282 extern int SysPpoll(struct pollfd *fds, nfds_t nfds, const struct timespec *tmo_p,
/kernel/linux/linux-5.10/Documentation/userspace-api/media/mediactl/
Drequest-func-poll.rst22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
30 ``nfds``
72 The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use
/kernel/liteos_a/testsuites/unittest/libc/io/full/
DIt_stdlib_poll_003.cpp34 int nfds; member
62 ret = poll(&pollFd, pollParam[i].nfds, pollParam[i].timeout); in Testcase()
/kernel/linux/linux-5.10/Documentation/userspace-api/media/cec/
Dcec-func-poll.rst22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
30 ``nfds``
73 The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use
/kernel/liteos_m/kal/libc/newlib/porting/include/
Dpoll.h56 int poll(struct pollfd *fds, nfds_t nfds, int timeout);
/kernel/linux/linux-5.10/Documentation/userspace-api/media/v4l/
Dfunc-select.rst24 .. c:function:: int select( int nfds, fd_set *readfds, fd_set *writefds, fd_set *exceptfds, struct …
29 ``nfds``
110 The ``nfds`` argument is less than zero or greater than
Dfunc-poll.rst22 .. c:function:: int poll( struct pollfd *ufds, unsigned int nfds, int timeout )
112 The ``nfds`` value exceeds the ``RLIMIT_NOFILE`` value. Use
/kernel/linux/linux-5.10/tools/lib/perf/
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-5.10/tools/testing/selftests/x86/
Dtest_syscall_vdso.c171 int nfds; variable
184 nfds = 42; in prep_args()
/kernel/linux/linux-5.10/tools/include/nolibc/
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, rfds, wfds, efds, timeout); in select()
/kernel/linux/linux-5.10/include/linux/
Drestart_block.h50 int nfds; member
Dcompat.h579 unsigned int nfds,
584 unsigned int nfds,
Dsyscalls.h1134 asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
/kernel/liteos_a/testsuites/unittest/net/socket/smoke/
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/uniproton/src/net/lwip-2.1/src/
Dsockets.c245 int poll(struct pollfd *fds, nfds_t nfds, int timeout) in poll() argument
247 return lwip_poll(fds, nfds, timeout); in poll()
/kernel/liteos_m/components/net/lwip-2.1/porting/src/
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/linux/linux-5.10/tools/testing/selftests/net/
Dnettest.c945 int nfds; in msg_loop() local
966 nfds = interactive ? MAX(fileno(stdin), sd) + 1 : sd + 1; in msg_loop()
973 rc = select(nfds, &rfds, NULL, NULL, ptval); in msg_loop()