procfs.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef _SYS_PROCFS_H
  2. #define _SYS_PROCFS_H
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #include <sys/time.h>
  7. #include <sys/types.h>
  8. #include <sys/user.h>
  9. struct elf_siginfo {
  10. int si_signo;
  11. int si_code;
  12. int si_errno;
  13. };
  14. struct elf_prstatus {
  15. struct elf_siginfo pr_info;
  16. short int pr_cursig;
  17. unsigned long int pr_sigpend;
  18. unsigned long int pr_sighold;
  19. pid_t pr_pid;
  20. pid_t pr_ppid;
  21. pid_t pr_pgrp;
  22. pid_t pr_sid;
  23. struct timeval pr_utime;
  24. struct timeval pr_stime;
  25. struct timeval pr_cutime;
  26. struct timeval pr_cstime;
  27. elf_gregset_t pr_reg;
  28. int pr_fpvalid;
  29. };
  30. #define ELF_PRARGSZ 80
  31. struct elf_prpsinfo {
  32. char pr_state;
  33. char pr_sname;
  34. char pr_zomb;
  35. char pr_nice;
  36. unsigned long int pr_flag;
  37. #if UINTPTR_MAX == 0xffffffff
  38. unsigned short int pr_uid;
  39. unsigned short int pr_gid;
  40. #else
  41. unsigned int pr_uid;
  42. unsigned int pr_gid;
  43. #endif
  44. int pr_pid, pr_ppid, pr_pgrp, pr_sid;
  45. char pr_fname[16];
  46. char pr_psargs[ELF_PRARGSZ];
  47. };
  48. typedef void *psaddr_t;
  49. typedef elf_gregset_t prgregset_t;
  50. typedef elf_fpregset_t prfpregset_t;
  51. typedef pid_t lwpid_t;
  52. typedef struct elf_prstatus prstatus_t;
  53. typedef struct elf_prpsinfo prpsinfo_t;
  54. #ifdef __cplusplus
  55. }
  56. #endif
  57. #endif