Lines Matching refs:to

11  *     parameter to reflect time remaining.
14 * Changed sys_poll()/do_poll() to use PAGE_SIZE chunk-based allocation
15 * of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
47 * Consider this comment an open invitation to come up with even
109 * I have rewritten this, taking some shortcuts: This code may not be easy to
116 * as all select/poll functions have to call it to add an entry to the
194 * smp_wmb() is equivalent to smp_wmb() in try_to_wake_up()
204 * TODO: This is hacky but there currently is no interface to
205 * pass in @sync. @sync is scheduled to be removed and once
264 * poll_select_set_timeout - helper function to setup the timeout value
265 * @to: pointer to timespec64 variable for the final timeout
274 int poll_select_set_timeout(struct timespec64 *to, time64_t sec, long nsec)
283 to->tv_sec = to->tv_nsec = 0;
285 ktime_get_ts64(to);
286 *to = timespec64_add_safe(*to, ts);
358 * don't want the Linux-specific update to the timeval to
387 * Use "unsigned long" accesses to let user-mode fd_set's be long-aligned.
481 ktime_t expire, *to = NULL;
599 * given, then we convert to ktime_t and set the to
600 * pointer to the expiry value.
602 if (end_time && !to) {
604 to = &expire;
608 to, slack))
619 * like to be certain this leads to no problems. So I return
623 * I'm trying ERESTARTNOHAND which restart only when you want to.
633 /* Allocate small arguments on the stack to save memory and be faster */
640 /* max_fds can increase, so grab it once to avoid race */
650 * since we used fdset we need to allocate memory in units of
707 struct timespec64 end_time, *to = NULL;
715 to = &end_time;
716 if (poll_select_set_timeout(to,
722 ret = core_sys_select(n, inp, outp, exp, to);
737 struct timespec64 ts, end_time, *to = NULL;
754 to = &end_time;
755 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
763 ret = core_sys_select(n, inp, outp, exp, to);
769 * 6-argument version where the sixth argument is a pointer to a structure
770 * which has a pointer to the sigset_t itself followed by a size_t containing
778 static inline int get_sigset_argpack(struct sigset_argpack *to,
781 // the path is hot enough for overhead of copy_from_user() to matter
785 unsafe_get_user(to->p, &from->p, Efault);
786 unsafe_get_user(to->size, &from->size, Efault);
889 ktime_t expire, *to = NULL;
933 * a poll_table->_qproc to them on the next loop iteration.
957 * given, then we convert to ktime_t and set the to
958 * pointer to the expiry value.
960 if (end_time && !to) {
962 to = &expire;
965 if (!poll_schedule_timeout(wait, TASK_INTERRUPTIBLE, to, slack))
979 /* Allocate small arguments on the stack to save memory and be
980 faster - use long to make sure the buffer is aligned properly
981 on 64 bit archs to avoid unaligned access */
1052 struct timespec64 *to = NULL, end_time;
1058 to = &end_time;
1061 ret = do_sys_poll(ufds, nfds, to);
1072 struct timespec64 end_time, *to = NULL;
1076 to = &end_time;
1077 poll_select_set_timeout(to, timeout_msecs / MSEC_PER_SEC,
1081 ret = do_sys_poll(ufds, nfds, to);
1106 struct timespec64 ts, end_time, *to = NULL;
1113 to = &end_time;
1114 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1122 ret = do_sys_poll(ufds, nfds, to);
1132 struct timespec64 ts, end_time, *to = NULL;
1139 to = &end_time;
1140 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1148 ret = do_sys_poll(ufds, nfds, to);
1157 * Ooo, nasty. We need here to frob 32-bit unsigned longs to
1184 * should be compared to it from time to time
1189 * like to be certain this leads to no problems. So I return
1193 * I'm trying ERESTARTNOHAND which restart only when you want to.
1208 /* max_fds can increase, so grab it once to avoid race */
1218 * since we used fdset we need to allocate memory in units of
1270 struct timespec64 end_time, *to = NULL;
1278 to = &end_time;
1279 if (poll_select_set_timeout(to,
1285 ret = compat_core_sys_select(n, inp, outp, exp, to);
1319 struct timespec64 ts, end_time, *to = NULL;
1336 to = &end_time;
1337 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1345 ret = compat_core_sys_select(n, inp, outp, exp, to);
1353 static inline int get_compat_sigset_argpack(struct compat_sigset_argpack *to,
1359 unsafe_get_user(to->p, &from->p, Efault);
1360 unsafe_get_user(to->size, &from->size, Efault);
1404 struct timespec64 ts, end_time, *to = NULL;
1411 to = &end_time;
1412 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1420 ret = do_sys_poll(ufds, nfds, to);
1430 struct timespec64 ts, end_time, *to = NULL;
1437 to = &end_time;
1438 if (poll_select_set_timeout(to, ts.tv_sec, ts.tv_nsec))
1446 ret = do_sys_poll(ufds, nfds, to);