signalfd.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. //
  2. // Copyright 2026 Aarav Ravindra Kharade
  3. //
  4. // Licensed under the Apache License, Version 2.0 (the "License");
  5. // you may not use this file except in compliance with the License.
  6. // You may obtain a copy of the License at
  7. //
  8. // http://www.apache.org/licenses/LICENSE-2.0
  9. //
  10. // Unless required by applicable law or agreed to in writing, software
  11. // distributed under the License is distributed on an "AS IS" BASIS,
  12. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. // See the License for the specific language governing permissions and
  14. // limitations under the License.
  15. //
  16. /* Copyright (C) 2007-2026 Free Software Foundation, Inc.
  17. This file is part of the GNU C Library.
  18. The GNU C Library is free software; you can redistribute it and/or
  19. modify it under the terms of the GNU Lesser General Public
  20. License as published by the Free Software Foundation; either
  21. version 2.1 of the License, or (at your option) any later version.
  22. The GNU C Library is distributed in the hope that it will be useful,
  23. but WITHOUT ANY WARRANTY; without even the implied warranty of
  24. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  25. Lesser General Public License for more details.
  26. You should have received a copy of the GNU Lesser General Public
  27. License along with the GNU C Library; if not, see
  28. <https://www.gnu.org/licenses/>. */
  29. #ifndef _SYS_SIGNALFD_H
  30. #define _SYS_SIGNALFD_H 1
  31. #include <stdint.h>
  32. #include <bits/types/sigset_t.h>
  33. /* Get the platform-dependent flags. */
  34. #include <bits/signalfd.h>
  35. struct signalfd_siginfo
  36. {
  37. uint32_t ssi_signo;
  38. int32_t ssi_errno;
  39. int32_t ssi_code;
  40. uint32_t ssi_pid;
  41. uint32_t ssi_uid;
  42. int32_t ssi_fd;
  43. uint32_t ssi_tid;
  44. uint32_t ssi_band;
  45. uint32_t ssi_overrun;
  46. uint32_t ssi_trapno;
  47. int32_t ssi_status;
  48. int32_t ssi_int;
  49. uint64_t ssi_ptr;
  50. uint64_t ssi_utime;
  51. uint64_t ssi_stime;
  52. uint64_t ssi_addr;
  53. uint16_t ssi_addr_lsb;
  54. uint16_t __pad2;
  55. int32_t ssi_syscall;
  56. uint64_t ssi_call_addr;
  57. uint32_t ssi_arch;
  58. uint8_t __pad[28];
  59. };
  60. __BEGIN_DECLS
  61. /* Request notification for delivery of signals in MASK to be
  62. performed using descriptor FD.*/
  63. extern int signalfd (int __fd, const sigset_t *__mask, int __flags)
  64. __THROW __nonnull ((2));
  65. __END_DECLS
  66. #endif /* sys/signalfd.h */