(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
[glibc.git] / sysdeps / unix / sysv / linux / mips / sys / procfs.h
blob2bf07be3e9ea0bb8dc9062b6f2ad5f564c5dcbff
1 /* Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004
2 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 The GNU C Library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Lesser General Public License for more details.
15 You should have received a copy of the GNU Lesser General Public
16 License along with the GNU C Library; if not, write to the Free
17 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
18 02111-1307 USA. */
20 #ifndef _SYS_PROCFS_H
21 #define _SYS_PROCFS_H 1
23 /* This is somehow modelled after the file of the same name on SysVr4
24 systems. It provides a definition of the core file format for ELF
25 used on Linux. */
27 #include <features.h>
28 #include <sgidefs.h>
29 #include <sys/time.h>
30 #include <sys/types.h>
31 #include <sys/user.h>
32 #include <sgidefs.h>
34 /* ELF register definitions */
35 #define ELF_NGREG 45
36 #define ELF_NFPREG 33
38 #if _MIPS_SIM == _ABIN32
39 __extension__ typedef unsigned long long elf_greg_t;
40 #else
41 typedef unsigned long elf_greg_t;
42 #endif
43 typedef elf_greg_t elf_gregset_t[ELF_NGREG];
45 typedef double elf_fpreg_t;
46 typedef elf_fpreg_t elf_fpregset_t[ELF_NFPREG];
48 __BEGIN_DECLS
50 struct elf_siginfo
52 int si_signo; /* Signal number. */
53 int si_code; /* Extra code. */
54 int si_errno; /* Errno. */
58 /* Definitions to generate Intel SVR4-like core files. These mostly
59 have the same names as the SVR4 types with "elf_" tacked on the
60 front to prevent clashes with linux definitions, and the typedef
61 forms have been avoided. This is mostly like the SVR4 structure,
62 but more Linuxy, with things that Linux does not support and which
63 gdb doesn't really use excluded. Fields present but not used are
64 marked with "XXX". */
65 struct elf_prstatus
67 struct elf_siginfo pr_info; /* Info associated with signal. */
68 short int pr_cursig; /* Current signal. */
69 #if _MIPS_SIM == _ABIN32
70 __extension__ unsigned long long int pr_sigpend;
71 __extension__ unsigned long long int pr_sighold;
72 #else
73 unsigned long int pr_sigpend; /* Set of pending signals. */
74 unsigned long int pr_sighold; /* Set of held signals. */
75 #endif
76 __pid_t pr_pid;
77 __pid_t pr_ppid;
78 __pid_t pr_pgrp;
79 __pid_t pr_sid;
80 struct timeval pr_utime; /* User time. */
81 struct timeval pr_stime; /* System time. */
82 struct timeval pr_cutime; /* Cumulative user time. */
83 struct timeval pr_cstime; /* Cumulative system time. */
84 elf_gregset_t pr_reg; /* GP registers. */
85 int pr_fpvalid; /* True if math copro being used. */
89 #define ELF_PRARGSZ (80) /* Number of chars for args */
91 struct elf_prpsinfo
93 char pr_state; /* Numeric process state. */
94 char pr_sname; /* Char for pr_state. */
95 char pr_zomb; /* Zombie. */
96 char pr_nice; /* Nice val. */
97 #if _MIPS_SIM == _ABIN32
98 __extension__ unsigned long long int pr_flag;
99 #else
100 unsigned long int pr_flag; /* Flags. */
101 #endif
102 long pr_uid;
103 long pr_gid;
104 int pr_pid, pr_ppid, pr_pgrp, pr_sid;
105 /* Lots missing */
106 char pr_fname[16]; /* Filename of executable. */
107 char pr_psargs[ELF_PRARGSZ]; /* Initial part of arg list. */
111 /* Addresses. */
112 typedef void *psaddr_t;
114 /* Register sets. Linux has different names. */
115 typedef elf_gregset_t prgregset_t;
116 typedef elf_fpregset_t prfpregset_t;
118 /* We don't have any differences between processes and threads,
119 therefore habe only ine PID type. */
120 typedef __pid_t lwpid_t;
123 typedef struct elf_prstatus prstatus_t;
124 typedef struct elf_prpsinfo prpsinfo_t;
126 __END_DECLS
128 #endif /* sys/procfs.h */