Lines Matching +full:t +full:- +full:head
1 // SPDX-License-Identifier: GPL-2.0-or-later
12 * Implementation: user-space maintains a per-thread list of locks it
17 * per-thread. Userspace also maintains a per-thread 'list_op_pending'
24 * sys_set_robust_list() - Set the robust-futex list head of a task
25 * @head: pointer to the list-head
26 * @len: length of the list-head, as userspace expects
28 SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head, in SYSCALL_DEFINE2() argument
34 if (unlikely(len != sizeof(*head))) in SYSCALL_DEFINE2()
35 return -EINVAL; in SYSCALL_DEFINE2()
37 current->robust_list = head; in SYSCALL_DEFINE2()
43 * sys_get_robust_list() - Get the robust-futex list head of a task
45 * @head_ptr: pointer to a list-head pointer, the kernel fills it in
52 struct robust_list_head __user *head; in SYSCALL_DEFINE3() local
58 ret = -ESRCH; in SYSCALL_DEFINE3()
67 ret = -EPERM; in SYSCALL_DEFINE3()
71 head = p->robust_list; in SYSCALL_DEFINE3()
74 if (put_user(sizeof(*head), len_ptr)) in SYSCALL_DEFINE3()
75 return -EFAULT; in SYSCALL_DEFINE3()
76 return put_user(head, head_ptr); in SYSCALL_DEFINE3()
94 return -ENOSYS; in do_futex()
130 return -ENOSYS; in do_futex()
147 futex_init_timeout(u32 cmd, u32 op, struct timespec64 *ts, ktime_t *t) in futex_init_timeout() argument
150 return -EINVAL; in futex_init_timeout()
152 *t = timespec64_to_ktime(*ts); in futex_init_timeout()
154 *t = ktime_add_safe(ktime_get(), *t); in futex_init_timeout()
156 *t = timens_ktime_to_host(CLOCK_MONOTONIC, *t); in futex_init_timeout()
165 ktime_t t, *tp = NULL; in SYSCALL_DEFINE6() local
170 return -EFAULT; in SYSCALL_DEFINE6()
172 return -EFAULT; in SYSCALL_DEFINE6()
173 ret = futex_init_timeout(cmd, op, &ts, &t); in SYSCALL_DEFINE6()
176 tp = &t; in SYSCALL_DEFINE6()
183 * futex_parse_waitv - Parse a waitv array from userspace
204 return -EFAULT; in futex_parse_waitv()
207 return -EINVAL; in futex_parse_waitv()
211 return -EINVAL; in futex_parse_waitv()
214 return -EINVAL; in futex_parse_waitv()
244 return -EINVAL; in futex2_setup_timeout()
247 return -EFAULT; in futex2_setup_timeout()
263 hrtimer_cancel(&to->timer); in futex2_destroy_timeout()
264 destroy_hrtimer_on_stack(&to->timer); in futex2_destroy_timeout()
268 * sys_futex_waitv - Wait on a list of futexes
300 return -EINVAL; in SYSCALL_DEFINE5()
303 return -EINVAL; in SYSCALL_DEFINE5()
310 ret = -ENOMEM; in SYSCALL_DEFINE5()
328 * sys_futex_wake - Wake a number of futexes
345 return -EINVAL; in SYSCALL_DEFINE4()
349 return -EINVAL; in SYSCALL_DEFINE4()
352 return -EINVAL; in SYSCALL_DEFINE4()
358 * sys_futex_wait - Wait on a futex
382 return -EINVAL; in SYSCALL_DEFINE6()
386 return -EINVAL; in SYSCALL_DEFINE6()
390 return -EINVAL; in SYSCALL_DEFINE6()
404 * sys_futex_requeue - Requeue a waiter from one futex to another
425 return -EINVAL; in SYSCALL_DEFINE4()
428 return -EINVAL; in SYSCALL_DEFINE4()
443 struct compat_robust_list_head __user *, head, in COMPAT_SYSCALL_DEFINE2() argument
446 if (unlikely(len != sizeof(*head))) in COMPAT_SYSCALL_DEFINE2()
447 return -EINVAL; in COMPAT_SYSCALL_DEFINE2()
449 current->compat_robust_list = head; in COMPAT_SYSCALL_DEFINE2()
458 struct compat_robust_list_head __user *head; in COMPAT_SYSCALL_DEFINE3() local
464 ret = -ESRCH; in COMPAT_SYSCALL_DEFINE3()
473 ret = -EPERM; in COMPAT_SYSCALL_DEFINE3()
477 head = p->compat_robust_list; in COMPAT_SYSCALL_DEFINE3()
480 if (put_user(sizeof(*head), len_ptr)) in COMPAT_SYSCALL_DEFINE3()
481 return -EFAULT; in COMPAT_SYSCALL_DEFINE3()
482 return put_user(ptr_to_compat(head), head_ptr); in COMPAT_SYSCALL_DEFINE3()
497 ktime_t t, *tp = NULL; in SYSCALL_DEFINE6() local
502 return -EFAULT; in SYSCALL_DEFINE6()
503 ret = futex_init_timeout(cmd, op, &ts, &t); in SYSCALL_DEFINE6()
506 tp = &t; in SYSCALL_DEFINE6()