siginfo-arch.h 1.3 KB

123456789101112131415161718192021222324252627282930313233
  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. /* Architecture-specific adjustments to siginfo_t. x86 version. */
  17. #ifndef _BITS_SIGINFO_ARCH_H
  18. #define _BITS_SIGINFO_ARCH_H 1
  19. #if defined __x86_64__ && __WORDSIZE == 32
  20. /* si_utime and si_stime must be 4 byte aligned for x32 to match the
  21. kernel. We align siginfo_t to 8 bytes so that si_utime and
  22. si_stime are actually aligned to 8 bytes since their offsets are
  23. multiple of 8 bytes. Note: with some compilers, the alignment
  24. attribute would be ignored if it were put in __SI_CLOCK_T instead
  25. of encapsulated in a typedef. */
  26. typedef __clock_t __attribute__ ((__aligned__ (4))) __sigchld_clock_t;
  27. # define __SI_ALIGNMENT __attribute__ ((__aligned__ (8)))
  28. # define __SI_CLOCK_T __sigchld_clock_t
  29. #endif
  30. #endif