Processor context definitions for Linux/Arm.
authorUlrich Drepper <drepper@redhat.com>
Sun, 26 Mar 2000 18:41:48 +0000 (18:41 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 26 Mar 2000 18:41:48 +0000 (18:41 +0000)
sysdeps/unix/sysv/linux/arm/sys/ucontext.h [new file with mode: 0644]

diff --git a/sysdeps/unix/sysv/linux/arm/sys/ucontext.h b/sysdeps/unix/sysv/linux/arm/sys/ucontext.h
new file mode 100644 (file)
index 0000000..6e51efe
--- /dev/null
@@ -0,0 +1,94 @@
+/* Copyright (C) 1998, 1999 Free Software Foundation, Inc.\r
+   This file is part of the GNU C Library.\r
+\r
+   The GNU C Library is free software; you can redistribute it and/or\r
+   modify it under the terms of the GNU Library General Public License as\r
+   published by the Free Software Foundation; either version 2 of the\r
+   License, or (at your option) any later version.\r
+\r
+   The GNU C Library is distributed in the hope that it will be useful,\r
+   but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU\r
+   Library General Public License for more details.\r
+\r
+   You should have received a copy of the GNU Library General Public\r
+   License along with the GNU C Library; see the file COPYING.LIB.  If not,\r
+   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,\r
+   Boston, MA 02111-1307, USA.  */\r
+\r
+/* System V/ARM ABI compliant context switching support.  */\r
+\r
+#ifndef _SYS_UCONTEXT_H\r
+#define _SYS_UCONTEXT_H        1\r
+\r
+#include <features.h>\r
+#include <signal.h>\r
+#include <sys/elf.h>\r
+\r
+typedef int greg_t;\r
+\r
+/* Number of general registers.  */\r
+#define NGREG  16\r
+\r
+/* Container for all general registers.  */\r
+typedef elf_gregset_t gregset_t;\r
+\r
+/* Number of each register is the `gregset_t' array.  */\r
+enum\r
+{\r
+  R0 = 0,\r
+#define R0     R0\r
+  R1 = 1,\r
+#define R1     R1\r
+  R2 = 2,\r
+#define R2     R2\r
+  R3 = 3,\r
+#define R3     R3\r
+  R4 = 4,\r
+#define R4     R4\r
+  R5 = 5,\r
+#define R5     R5\r
+  R6 = 6,\r
+#define R6     R6\r
+  R7 = 7,\r
+#define R7     R7\r
+  R8 = 8,\r
+#define R8     R8\r
+  R9 = 9,\r
+#define R9     R9\r
+  R10 = 10,\r
+#define R10    R10\r
+  R11 = 11,\r
+#define R11    R11\r
+  R12 = 12,\r
+#define R12    R12\r
+  R13 = 13,\r
+#define R13    R13\r
+  R14 = 14,\r
+#define R14    R14\r
+  R15 = 15,\r
+#define R15    R15\r
+};\r
+\r
+/* Structure to describe FPU registers.  */\r
+typedef elf_fpregset_t fpregset_t;\r
+\r
+/* Context to describe whole processor state.  */\r
+typedef struct\r
+  {\r
+    gregset_t gregs;\r
+    fpregset_t fpregs;\r
+  } mcontext_t;\r
+\r
+/* Userlevel context.  */\r
+typedef struct ucontext\r
+  {\r
+    unsigned long int uc_flags;\r
+    struct ucontext *uc_link;\r
+    __sigset_t uc_sigmask;\r
+    stack_t uc_stack;\r
+    mcontext_t uc_mcontext;\r
+    long int uc_filler[5];\r
+  } ucontext_t;\r
+\r
+#endif /* sys/ucontext.h */\r