signalfd.h 751 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef _SYS_SIGNALFD_H
  2. #define _SYS_SIGNALFD_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <stdint.h>
  7. #include <fcntl.h>
  8. #define __NEED_sigset_t
  9. #include <bits/alltypes.h>
  10. #define SFD_CLOEXEC O_CLOEXEC
  11. #define SFD_NONBLOCK O_NONBLOCK
  12. int signalfd(int, const sigset_t *, int);
  13. struct signalfd_siginfo {
  14. uint32_t ssi_signo;
  15. int32_t ssi_errno;
  16. int32_t ssi_code;
  17. uint32_t ssi_pid;
  18. uint32_t ssi_uid;
  19. int32_t ssi_fd;
  20. uint32_t ssi_tid;
  21. uint32_t ssi_band;
  22. uint32_t ssi_overrun;
  23. uint32_t ssi_trapno;
  24. int32_t ssi_status;
  25. int32_t ssi_int;
  26. uint64_t ssi_ptr;
  27. uint64_t ssi_utime;
  28. uint64_t ssi_stime;
  29. uint64_t ssi_addr;
  30. uint16_t ssi_addr_lsb;
  31. uint8_t pad[128-12*4-4*8-2];
  32. };
  33. #ifdef __cplusplus
  34. }
  35. #endif
  36. #endif