1 /* Extra sys/procfs.h definitions.  SPARC version.
2    Copyright (C) 1996-2022 Free Software Foundation, Inc.
3    This file is part of the GNU C Library.
4 
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.
9 
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.
14 
15    You should have received a copy of the GNU Lesser General Public
16    License along with the GNU C Library; if not, see
17    <https://www.gnu.org/licenses/>.  */
18 
19 #ifndef _SYS_PROCFS_H
20 # error "Never include <bits/procfs-extra.h> directly; use <sys/procfs.h> instead."
21 #endif
22 
23 #if __WORDSIZE == 64
24 
25 /* Provide 32-bit variants so that BFD can read 32-bit
26    core files.  */
27 #define ELF_NGREG32		38
28 typedef struct
29   {
30     union
31       {
32 	unsigned int	pr_regs[32];
33 	double		pr_dregs[16];
34       }			pr_fr;
35     unsigned int	__glibc_reserved;
36     unsigned int	pr_fsr;
37     unsigned char	pr_qcnt;
38     unsigned char	pr_q_entrysize;
39     unsigned char	pr_en;
40     unsigned int	pr_q[64];
41   } elf_fpregset_t32;
42 
43 typedef unsigned int elf_greg_t32;
44 typedef elf_greg_t32 elf_gregset_t32[ELF_NGREG32];
45 
46 struct elf_prstatus32
47   {
48     struct elf_siginfo pr_info;		/* Info associated with signal.  */
49     short int pr_cursig;		/* Current signal.  */
50     unsigned int pr_sigpend;	/* Set of pending signals.  */
51     unsigned int pr_sighold;	/* Set of held signals.  */
52     __pid_t pr_pid;
53     __pid_t pr_ppid;
54     __pid_t pr_pgrp;
55     __pid_t pr_sid;
56     struct
57       {
58 	int tv_sec, tv_usec;
59       } pr_utime,			/* User time.  */
60         pr_stime,			/* System time.  */
61         pr_cutime,			/* Cumulative user time.  */
62         pr_cstime;			/* Cumulative system time.  */
63     elf_gregset_t32 pr_reg;		/* GP registers.  */
64     int pr_fpvalid;			/* True if math copro being used.  */
65   };
66 
67 struct elf_prpsinfo32
68   {
69     char pr_state;			/* Numeric process state.  */
70     char pr_sname;			/* Char for pr_state.  */
71     char pr_zomb;			/* Zombie.  */
72     char pr_nice;			/* Nice val.  */
73     unsigned int pr_flag;		/* Flags.  */
74     unsigned short int pr_uid;
75     unsigned short int pr_gid;
76     int pr_pid, pr_ppid, pr_pgrp, pr_sid;
77     /* Lots missing */
78     char pr_fname[16];			/* Filename of executable.  */
79     char pr_psargs[ELF_PRARGSZ];	/* Initial part of arg list.  */
80   };
81 
82 typedef elf_gregset_t32 prgregset32_t;
83 typedef elf_fpregset_t32 prfpregset32_t;
84 
85 typedef struct elf_prstatus32 prstatus32_t;
86 typedef struct elf_prpsinfo32 prpsinfo32_t;
87 
88 #endif  /* sparc64 */
89