procfs.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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 {
  24. long tv_sec, tv_usec;
  25. } pr_utime, pr_stime, pr_cutime, pr_cstime;
  26. elf_gregset_t pr_reg;
  27. int pr_fpvalid;
  28. };
  29. #define ELF_PRARGSZ 80
  30. struct elf_prpsinfo {
  31. char pr_state;
  32. char pr_sname;
  33. char pr_zomb;
  34. char pr_nice;
  35. unsigned long int pr_flag;
  36. #if UINTPTR_MAX == 0xffffffff
  37. unsigned short int pr_uid;
  38. unsigned short int pr_gid;
  39. #else
  40. unsigned int pr_uid;
  41. unsigned int pr_gid;
  42. #endif
  43. int pr_pid, pr_ppid, pr_pgrp, pr_sid;
  44. char pr_fname[16];
  45. char pr_psargs[ELF_PRARGSZ];
  46. };
  47. typedef void *psaddr_t;
  48. typedef elf_gregset_t prgregset_t;
  49. typedef elf_fpregset_t prfpregset_t;
  50. typedef pid_t lwpid_t;
  51. typedef struct elf_prstatus prstatus_t;
  52. typedef struct elf_prpsinfo prpsinfo_t;
  53. #ifdef __cplusplus
  54. }
  55. #endif
  56. #endif