restart_block.h 1.1 KB

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