procfs.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. {
  33. char pr_state;
  34. char pr_sname;
  35. char pr_zomb;
  36. char pr_nice;
  37. unsigned long int pr_flag;
  38. #if UINTPTR_MAX == 0xffffffff
  39. unsigned short int pr_uid;
  40. unsigned short int pr_gid;
  41. #else
  42. unsigned int pr_uid;
  43. unsigned int pr_gid;
  44. #endif
  45. int pr_pid, pr_ppid, pr_pgrp, pr_sid;
  46. char pr_fname[16];
  47. char pr_psargs[ELF_PRARGSZ];
  48. };
  49. typedef void *psaddr_t;
  50. typedef elf_gregset_t prgregset_t;
  51. typedef elf_fpregset_t prfpregset_t;
  52. typedef pid_t lwpid_t;
  53. typedef struct elf_prstatus prstatus_t;
  54. typedef struct elf_prpsinfo prpsinfo_t;
  55. #ifdef __cplusplus
  56. }
  57. #endif
  58. #endif