Rich Felker | 0b44a03 | 2011-02-12 00:22:29 -0500 | [diff] [blame^] | 1 | #ifndef _SYS_PROCFS_H |
| 2 | #define _SYS_PROCFS_H |
| 3 | #ifdef __cplusplus |
| 4 | extern "C" { |
| 5 | #endif |
| 6 | |
| 7 | #include <sys/time.h> |
| 8 | #include <sys/types.h> |
| 9 | #include <sys/user.h> |
| 10 | |
| 11 | typedef unsigned long elf_greg_t; |
| 12 | #define ELF_NGREG (sizeof (struct user_regs_struct) / sizeof(elf_greg_t)) |
| 13 | typedef elf_greg_t elf_gregset_t[ELF_NGREG]; |
| 14 | |
| 15 | #if __WORDSIZE == 32 |
| 16 | typedef struct user_fpregs_struct elf_fpregset_t; |
| 17 | typedef struct user_fpxregs_struct elf_fpxregset_t; |
| 18 | #else |
| 19 | typedef struct user_fpregs_struct elf_fpregset_t; |
| 20 | #endif |
| 21 | |
| 22 | struct elf_siginfo { |
| 23 | int si_signo; |
| 24 | int si_code; |
| 25 | int si_errno; |
| 26 | }; |
| 27 | |
| 28 | struct elf_prstatus { |
| 29 | struct elf_siginfo pr_info; |
| 30 | short int pr_cursig; |
| 31 | unsigned long int pr_sigpend; |
| 32 | unsigned long int pr_sighold; |
| 33 | pid_t pr_pid; |
| 34 | pid_t pr_ppid; |
| 35 | pid_t pr_pgrp; |
| 36 | pid_t pr_sid; |
| 37 | struct timeval pr_utime; |
| 38 | struct timeval pr_stime; |
| 39 | struct timeval pr_cutime; |
| 40 | struct timeval pr_cstime; |
| 41 | elf_gregset_t pr_reg; |
| 42 | int pr_fpvalid; |
| 43 | }; |
| 44 | |
| 45 | |
| 46 | #define ELF_PRARGSZ 80 |
| 47 | |
| 48 | struct elf_prpsinfo |
| 49 | { |
| 50 | char pr_state; |
| 51 | char pr_sname; |
| 52 | char pr_zomb; |
| 53 | char pr_nice; |
| 54 | unsigned long int pr_flag; |
| 55 | #if __WORDSIZE == 32 |
| 56 | unsigned short int pr_uid; |
| 57 | unsigned short int pr_gid; |
| 58 | #else |
| 59 | unsigned int pr_uid; |
| 60 | unsigned int pr_gid; |
| 61 | #endif |
| 62 | int pr_pid, pr_ppid, pr_pgrp, pr_sid; |
| 63 | char pr_fname[16]; |
| 64 | char pr_psargs[ELF_PRARGSZ]; |
| 65 | }; |
| 66 | |
| 67 | |
| 68 | typedef void *psaddr_t; |
| 69 | typedef elf_gregset_t prgregset_t; |
| 70 | typedef elf_fpregset_t prfpregset_t; |
| 71 | typedef pid_t lwpid_t; |
| 72 | typedef struct elf_prstatus prstatus_t; |
| 73 | typedef struct elf_prpsinfo prpsinfo_t; |
| 74 | |
| 75 | |
| 76 | |
| 77 | |
| 78 | #ifdef __cplusplus |
| 79 | } |
| 80 | #endif |
| 81 | #endif |