1
0

procfs.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. /* Types for registers for sys/procfs.h. x86 version.
  17. Copyright (C) 2001-2026 Free Software Foundation, Inc.
  18. This file is part of the GNU C Library.
  19. The GNU C Library is free software; you can redistribute it and/or
  20. modify it under the terms of the GNU Lesser General Public
  21. License as published by the Free Software Foundation; either
  22. version 2.1 of the License, or (at your option) any later version.
  23. The GNU C Library is distributed in the hope that it will be useful,
  24. but WITHOUT ANY WARRANTY; without even the implied warranty of
  25. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  26. Lesser General Public License for more details.
  27. You should have received a copy of the GNU Lesser General Public
  28. License along with the GNU C Library; if not, see
  29. <https://www.gnu.org/licenses/>. */
  30. #ifndef _SYS_PROCFS_H
  31. # error "Never include <bits/procfs.h> directly; use <sys/procfs.h> instead."
  32. #endif
  33. /* Type for a general-purpose register. */
  34. #ifdef __x86_64__
  35. __extension__ typedef unsigned long long elf_greg_t;
  36. #else
  37. typedef unsigned long elf_greg_t;
  38. #endif
  39. /* And the whole bunch of them. We could have used `struct
  40. user_regs_struct' directly in the typedef, but tradition says that
  41. the register set is an array, which does have some peculiar
  42. semantics, so leave it that way. */
  43. #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof (elf_greg_t))
  44. typedef elf_greg_t elf_gregset_t[ELF_NGREG];
  45. #ifndef __x86_64__
  46. /* Register set for the floating-point registers. */
  47. typedef struct user_fpregs_struct elf_fpregset_t;
  48. /* Register set for the extended floating-point registers. Includes
  49. the Pentium III SSE registers in addition to the classic
  50. floating-point stuff. */
  51. typedef struct user_fpxregs_struct elf_fpxregset_t;
  52. #else
  53. /* Register set for the extended floating-point registers. Includes
  54. the Pentium III SSE registers in addition to the classic
  55. floating-point stuff. */
  56. typedef struct user_fpregs_struct elf_fpregset_t;
  57. #endif