Mark Rutland | 53d74d0 | 2016-10-19 19:28:12 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * Common syscall restarting data |
| 3 | */ |
| 4 | #ifndef __LINUX_RESTART_BLOCK_H |
| 5 | #define __LINUX_RESTART_BLOCK_H |
| 6 | |
| 7 | #include <linux/compiler.h> |
| 8 | #include <linux/types.h> |
| 9 | |
| 10 | struct timespec; |
| 11 | struct compat_timespec; |
| 12 | struct pollfd; |
| 13 | |
| 14 | /* |
| 15 | * System call restart block. |
| 16 | */ |
| 17 | struct restart_block { |
| 18 | long (*fn)(struct restart_block *); |
| 19 | union { |
| 20 | /* For futex_wait and futex_wait_requeue_pi */ |
| 21 | struct { |
| 22 | u32 __user *uaddr; |
| 23 | u32 val; |
| 24 | u32 flags; |
| 25 | u32 bitset; |
| 26 | u64 time; |
| 27 | u32 __user *uaddr2; |
| 28 | } futex; |
| 29 | /* For nanosleep */ |
| 30 | struct { |
| 31 | clockid_t clockid; |
| 32 | struct timespec __user *rmtp; |
| 33 | #ifdef CONFIG_COMPAT |
| 34 | struct compat_timespec __user *compat_rmtp; |
| 35 | #endif |
| 36 | u64 expires; |
| 37 | } nanosleep; |
| 38 | /* For poll */ |
| 39 | struct { |
| 40 | struct pollfd __user *ufds; |
| 41 | int nfds; |
| 42 | int has_timeout; |
| 43 | unsigned long tv_sec; |
| 44 | unsigned long tv_nsec; |
| 45 | } poll; |
| 46 | }; |
| 47 | }; |
| 48 | |
| 49 | extern long do_no_restart_syscall(struct restart_block *parm); |
| 50 | |
| 51 | #endif /* __LINUX_RESTART_BLOCK_H */ |