restart_block.h 949 B

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