signalfd.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. /* Copyright (C) 2007-2012 Free Software Foundation, Inc.
  2. This file is part of the GNU C Library.
  3. The GNU C Library is free software; you can redistribute it and/or
  4. modify it under the terms of the GNU Lesser General Public
  5. License as published by the Free Software Foundation; either
  6. version 2.1 of the License, or (at your option) any later version.
  7. The GNU C Library is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public
  12. License along with the GNU C Library; if not, see
  13. <http://www.gnu.org/licenses/>. */
  14. #ifndef _SYS_SIGNALFD_H
  15. #define _SYS_SIGNALFD_H 1
  16. #define __need_sigset_t
  17. #include <signal.h>
  18. #include <stdint.h>
  19. /* Get the platform-dependent flags. */
  20. #include <bits/signalfd.h>
  21. struct signalfd_siginfo
  22. {
  23. uint32_t ssi_signo;
  24. int32_t ssi_errno;
  25. int32_t ssi_code;
  26. uint32_t ssi_pid;
  27. uint32_t ssi_uid;
  28. int32_t ssi_fd;
  29. uint32_t ssi_tid;
  30. uint32_t ssi_band;
  31. uint32_t ssi_overrun;
  32. uint32_t ssi_trapno;
  33. int32_t ssi_status;
  34. int32_t ssi_int;
  35. uint64_t ssi_ptr;
  36. uint64_t ssi_utime;
  37. uint64_t ssi_stime;
  38. uint64_t ssi_addr;
  39. uint8_t __pad[48];
  40. };
  41. __BEGIN_DECLS
  42. /* Request notification for delivery of signals in MASK to be
  43. performed using descriptor FD.*/
  44. extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
  45. __THROW __nonnull ((2));
  46. __END_DECLS
  47. #endif /* sys/signalfd.h */