Linux kernel mirror (for testing)
git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel
os
linux
1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Common syscall restarting data
4 */
5#ifndef __LINUX_RESTART_BLOCK_H
6#define __LINUX_RESTART_BLOCK_H
7
8#include <linux/compiler.h>
9#include <linux/time64.h>
10#include <linux/types.h>
11
12struct __kernel_timespec;
13struct timespec;
14struct old_timespec32;
15struct pollfd;
16
17enum timespec_type {
18 TT_NONE = 0,
19 TT_NATIVE = 1,
20 TT_COMPAT = 2,
21};
22
23/*
24 * System call restart block.
25 */
26struct restart_block {
27 unsigned long arch_data;
28 long (*fn)(struct restart_block *);
29 union {
30 /* For futex_wait() */
31 struct {
32 u32 __user *uaddr;
33 u32 val;
34 u32 flags;
35 u32 bitset;
36 ktime_t time;
37 u32 __user *uaddr2;
38 } futex;
39 /* For nanosleep */
40 struct {
41 clockid_t clockid;
42 enum timespec_type type;
43 union {
44 struct __kernel_timespec __user *rmtp;
45 struct old_timespec32 __user *compat_rmtp;
46 };
47 ktime_t expires;
48 } nanosleep;
49 /* For poll */
50 struct {
51 struct pollfd __user *ufds;
52 int nfds;
53 int has_timeout;
54 struct timespec64 end_time;
55 } poll;
56 };
57};
58
59extern long do_no_restart_syscall(struct restart_block *parm);
60
61#endif /* __LINUX_RESTART_BLOCK_H */