diff options
Diffstat (limited to 'sysdeps/unix/sysv/linux')
-rw-r--r-- | sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/arm/sys/ucontext.h | 36 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/hppa/sys/ucontext.h | 6 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/m68k/sys/ucontext.h | 44 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/nios2/sys/ucontext.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sh/sys/ucontext.h | 34 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/tile/sys/ucontext.h | 6 |
7 files changed, 75 insertions, 59 deletions
diff --git a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h index 0bf101ada5..536404dd71 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/aarch64/sys/ucontext.h @@ -29,7 +29,8 @@ #include <bits/sigcontext.h> #include <bits/sigstack.h> -#include <sys/procfs.h> +#ifdef __USE_MISC +# include <sys/procfs.h> typedef elf_greg_t greg_t; @@ -39,6 +40,7 @@ typedef elf_gregset_t gregset_t; /* Structure to describe FPU registers. */ typedef elf_fpregset_t fpregset_t; +#endif /* Context to describe whole processor state. This only describes the core registers; coprocessor registers get saved elsewhere diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h index cdd39654eb..aedeccdabe 100644 --- a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h @@ -29,10 +29,11 @@ #include <bits/sigstack.h> +#ifdef __USE_MISC typedef int greg_t; /* Number of general registers. */ -#define NGREG 18 +# define NGREG 18 /* Container for all general registers. */ typedef greg_t gregset_t[NGREG]; @@ -41,37 +42,37 @@ typedef greg_t gregset_t[NGREG]; enum { REG_R0 = 0, -#define REG_R0 REG_R0 +# define REG_R0 REG_R0 REG_R1 = 1, -#define REG_R1 REG_R1 +# define REG_R1 REG_R1 REG_R2 = 2, -#define REG_R2 REG_R2 +# define REG_R2 REG_R2 REG_R3 = 3, -#define REG_R3 REG_R3 +# define REG_R3 REG_R3 REG_R4 = 4, -#define REG_R4 REG_R4 +# define REG_R4 REG_R4 REG_R5 = 5, -#define REG_R5 REG_R5 +# define REG_R5 REG_R5 REG_R6 = 6, -#define REG_R6 REG_R6 +# define REG_R6 REG_R6 REG_R7 = 7, -#define REG_R7 REG_R7 +# define REG_R7 REG_R7 REG_R8 = 8, -#define REG_R8 REG_R8 +# define REG_R8 REG_R8 REG_R9 = 9, -#define REG_R9 REG_R9 +# define REG_R9 REG_R9 REG_R10 = 10, -#define REG_R10 REG_R10 +# define REG_R10 REG_R10 REG_R11 = 11, -#define REG_R11 REG_R11 +# define REG_R11 REG_R11 REG_R12 = 12, -#define REG_R12 REG_R12 +# define REG_R12 REG_R12 REG_R13 = 13, -#define REG_R13 REG_R13 +# define REG_R13 REG_R13 REG_R14 = 14, -#define REG_R14 REG_R14 +# define REG_R14 REG_R14 REG_R15 = 15 -#define REG_R15 REG_R15 +# define REG_R15 REG_R15 }; struct _libc_fpstate @@ -93,6 +94,7 @@ struct _libc_fpstate }; /* Structure to describe FPU registers. */ typedef struct _libc_fpstate fpregset_t; +#endif /* Context to describe whole processor state. This only describes the core registers; coprocessor registers get saved elsewhere diff --git a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h index 8faac50433..31eb77e01b 100644 --- a/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/hppa/sys/ucontext.h @@ -29,12 +29,13 @@ #include <bits/sigstack.h> +#ifdef __USE_MISC /* Type for general register. */ typedef unsigned long int greg_t; /* Number of general registers. */ -#define NGREG 80 -#define NFPREG 32 +# define NGREG 80 +# define NFPREG 32 /* Container for all general registers. */ typedef struct gregset @@ -50,6 +51,7 @@ typedef struct fpregset { double fp_dregs[32]; } fpregset_t; +#endif /* Context to describe whole processor state. */ typedef struct sigcontext mcontext_t; diff --git a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h index 977b4ee6cd..3c5dce5b73 100644 --- a/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/m68k/sys/ucontext.h @@ -38,48 +38,50 @@ typedef int greg_t; /* Container for all general registers. */ typedef greg_t gregset_t[NGREG]; +#ifdef __USE_MISC /* Number of each register is the `gregset_t' array. */ enum { R_D0 = 0, -#define R_D0 R_D0 +# define R_D0 R_D0 R_D1 = 1, -#define R_D1 R_D1 +# define R_D1 R_D1 R_D2 = 2, -#define R_D2 R_D2 +# define R_D2 R_D2 R_D3 = 3, -#define R_D3 R_D3 +# define R_D3 R_D3 R_D4 = 4, -#define R_D4 R_D4 +# define R_D4 R_D4 R_D5 = 5, -#define R_D5 R_D5 +# define R_D5 R_D5 R_D6 = 6, -#define R_D6 R_D6 +# define R_D6 R_D6 R_D7 = 7, -#define R_D7 R_D7 +# define R_D7 R_D7 R_A0 = 8, -#define R_A0 R_A0 +# define R_A0 R_A0 R_A1 = 9, -#define R_A1 R_A1 +# define R_A1 R_A1 R_A2 = 10, -#define R_A2 R_A2 +# define R_A2 R_A2 R_A3 = 11, -#define R_A3 R_A3 +# define R_A3 R_A3 R_A4 = 12, -#define R_A4 R_A4 +# define R_A4 R_A4 R_A5 = 13, -#define R_A5 R_A5 +# define R_A5 R_A5 R_A6 = 14, -#define R_A6 R_A6 +# define R_A6 R_A6 R_A7 = 15, -#define R_A7 R_A7 +# define R_A7 R_A7 R_SP = 15, -#define R_SP R_SP +# define R_SP R_SP R_PC = 16, -#define R_PC R_PC +# define R_PC R_PC R_PS = 17 -#define R_PS R_PS +# define R_PS R_PS }; +#endif /* Structure to describe FPU registers. */ typedef struct fpregset @@ -102,7 +104,9 @@ typedef struct fpregset_t fpregs; } mcontext_t; -#define MCONTEXT_VERSION 2 +#ifdef __USE_MISC +# define MCONTEXT_VERSION 2 +#endif /* Userlevel context. */ typedef struct ucontext diff --git a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h index 6701d7ed94..3b0a615abe 100644 --- a/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/nios2/sys/ucontext.h @@ -32,7 +32,9 @@ /* These definitions must be in sync with the kernel. */ -#define MCONTEXT_VERSION 2 +#ifdef __USE_MISC +# define MCONTEXT_VERSION 2 +#endif /* Context to describe whole processor state. */ typedef struct mcontext diff --git a/sysdeps/unix/sysv/linux/sh/sys/ucontext.h b/sysdeps/unix/sysv/linux/sh/sys/ucontext.h index 9fa479c151..5c6a5e4a7a 100644 --- a/sysdeps/unix/sysv/linux/sh/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/sh/sys/ucontext.h @@ -37,42 +37,44 @@ typedef int greg_t; /* Container for all general registers. */ typedef greg_t gregset_t[NGREG]; +#ifdef __USE_MISC /* Number of each register is the `gregset_t' array. */ enum { REG_R0 = 0, -#define REG_R0 REG_R0 +# define REG_R0 REG_R0 REG_R1 = 1, -#define REG_R1 REG_R1 +# define REG_R1 REG_R1 REG_R2 = 2, -#define REG_R2 REG_R2 +# define REG_R2 REG_R2 REG_R3 = 3, -#define REG_R3 REG_R3 +# define REG_R3 REG_R3 REG_R4 = 4, -#define REG_R4 REG_R4 +# define REG_R4 REG_R4 REG_R5 = 5, -#define REG_R5 REG_R5 +# define REG_R5 REG_R5 REG_R6 = 6, -#define REG_R6 REG_R6 +# define REG_R6 REG_R6 REG_R7 = 7, -#define REG_R7 REG_R7 +# define REG_R7 REG_R7 REG_R8 = 8, -#define REG_R8 REG_R8 +# define REG_R8 REG_R8 REG_R9 = 9, -#define REG_R9 REG_R9 +# define REG_R9 REG_R9 REG_R10 = 10, -#define REG_R10 REG_R10 +# define REG_R10 REG_R10 REG_R11 = 11, -#define REG_R11 REG_R11 +# define REG_R11 REG_R11 REG_R12 = 12, -#define REG_R12 REG_R12 +# define REG_R12 REG_R12 REG_R13 = 13, -#define REG_R13 REG_R13 +# define REG_R13 REG_R13 REG_R14 = 14, -#define REG_R14 REG_R14 +# define REG_R14 REG_R14 REG_R15 = 15, -#define REG_R15 REG_R15 +# define REG_R15 REG_R15 }; +#endif typedef int freg_t; diff --git a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h index 247f2976fb..95e6dd68f5 100644 --- a/sysdeps/unix/sysv/linux/tile/sys/ucontext.h +++ b/sysdeps/unix/sysv/linux/tile/sys/ucontext.h @@ -27,18 +27,20 @@ #include <bits/sigcontext.h> #include <bits/sigstack.h> +#ifdef __USE_MISC /* Get register type and register names. */ -#include <arch/abi.h> +# include <arch/abi.h> /* Type for general register. */ typedef uint_reg_t greg_t; /* Number of general registers. Must agree with <asm/ptrace.h>. */ -#define NGREG 64 +# define NGREG 64 /* Container for all general registers. */ typedef greg_t gregset_t[NGREG]; +#endif #ifdef __USE_GNU /* Names for interesting registers in the `gregset_t' array. */ |