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 enum timespec_type { 15 TT_NONE = 0, 16 TT_NATIVE = 1, 17 #ifdef CONFIG_COMPAT 18 TT_COMPAT = 2, 19 #endif 20 }; 21 22 /* 23 * System call restart block. 24 */ 25 struct restart_block { 26 long (*fn)(struct restart_block *); 27 union { 28 /* For futex_wait and futex_wait_requeue_pi */ 29 struct { 30 u32 __user *uaddr; 31 u32 val; 32 u32 flags; 33 u32 bitset; 34 u64 time; 35 u32 __user *uaddr2; 36 } futex; 37 /* For nanosleep */ 38 struct { 39 clockid_t clockid; 40 enum timespec_type type; 41 union { 42 struct timespec __user *rmtp; 43 #ifdef CONFIG_COMPAT 44 struct compat_timespec __user *compat_rmtp; 45 #endif 46 }; 47 u64 expires; 48 } nanosleep; 49 /* For poll */ 50 struct { 51 struct pollfd __user *ufds; 52 int nfds; 53 int has_timeout; 54 unsigned long tv_sec; 55 unsigned long tv_nsec; 56 } poll; 57 }; 58 }; 59 60 extern long do_no_restart_syscall(struct restart_block *parm); 61 62 #endif /* __LINUX_RESTART_BLOCK_H */ 63