update from main archive 961009
[glibc/history.git] / sysdeps / unix / sysv / linux / sys / procfs.h
blobd4a38980c3d34aebe60fadcb930d615793720d13
1 /* Copyright (C) 1996 Free Software Foundation, Inc.
2 This file is part of the GNU C Library.
4 The GNU C Library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public License as
6 published by the Free Software Foundation; either version 2 of the
7 License, or (at your option) any later version.
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public
15 License along with the GNU C Library; see the file COPYING.LIB. If
16 not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA. */
19 #ifndef _SYS_PROCFS_H
21 #define _SYS_PROCFS_H 1
22 #include <features.h>
24 /* This is somehow modelled after the file of the same name on SysVr4
25 systems. It provides a definition of the core file format for ELF
26 used on Linux. */
28 #include <signal.h>
29 #include <sys/time.h>
30 #include <sys/types.h>
31 #include <asm/elf.h>
33 struct elf_siginfo
35 int si_signo; /* signal number */
36 int si_code; /* extra code */
37 int si_errno; /* errno */
40 typedef elf_greg_t greg_t;
41 typedef elf_gregset_t gregset_t;
42 typedef elf_fpregset_t fpregset_t;
43 #define NGREG ELF_NGREG
45 /* Definitions to generate Intel SVR4-like core files. These mostly
46 have the same names as the SVR4 types with "elf_" tacked on the
47 front to prevent clashes with linux definitions, and the typedef
48 forms have been avoided. This is mostly like the SVR4 structure,
49 but more Linuxy, with things that Linux does not support and which
50 gdb doesn't really use excluded. Fields present but not used are
51 marked with "XXX". */
52 struct elf_prstatus
54 #if 0
55 long pr_flags; /* XXX Process flags */
56 short pr_why; /* XXX Reason for process halt */
57 short pr_what; /* XXX More detailed reason */
58 #endif
59 struct elf_siginfo pr_info; /* Info associated with signal */
60 short pr_cursig; /* Current signal */
61 sigset_t pr_sigpend; /* Set of pending signals */
62 sigset_t pr_sighold; /* Set of held signals */
63 #if 0
64 struct sigaltstack pr_altstack; /* Alternate stack info */
65 struct sigaction pr_action; /* Signal action for current sig */
66 #endif
67 pid_t pr_pid;
68 pid_t pr_ppid;
69 pid_t pr_pgrp;
70 pid_t pr_sid;
71 struct timeval pr_utime; /* User time */
72 struct timeval pr_stime; /* System time */
73 struct timeval pr_cutime; /* Cumulative user time */
74 struct timeval pr_cstime; /* Cumulative system time */
75 #if 0
76 long pr_instr; /* Current instruction */
77 #endif
78 elf_gregset_t pr_reg; /* GP registers */
79 int pr_fpvalid; /* True if math copro being used. */
83 #define ELF_PRARGSZ (80) /* Number of chars for args */
85 struct elf_prpsinfo
87 char pr_state; /* numeric process state */
88 char pr_sname; /* char for pr_state */
89 char pr_zomb; /* zombie */
90 char pr_nice; /* nice val */
91 unsigned long pr_flag; /* flags */
92 uid_t pr_uid;
93 gid_t pr_gid;
94 pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
95 /* Lots missing */
96 char pr_fname[16]; /* filename of executable */
97 char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
101 typedef struct elf_prstatus prstatus_t;
102 typedef struct elf_prpsinfo prpsinfo_t;
105 #endif /* sys/procfs.h */