Add arm <sys/ucontext.h>.
Change-Id: I14d435f9e3e82f77d8a7e886ff88c18f5d09d14a
diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h
index fffd6b8..e7fbcd6 100644
--- a/libc/include/sys/ucontext.h
+++ b/libc/include/sys/ucontext.h
@@ -36,7 +36,43 @@
#if defined(__arm__)
-#error TODO
+enum {
+ REG_R0 = 0,
+ REG_R1,
+ REG_R2,
+ REG_R3,
+ REG_R4,
+ REG_R5,
+ REG_R6,
+ REG_R7,
+ REG_R8,
+ REG_R9,
+ REG_R10,
+ REG_R11,
+ REG_R12,
+ REG_R13,
+ REG_R14,
+ REG_R15,
+};
+
+#define NGREG 18 /* Like glibc. */
+
+typedef int greg_t;
+typedef greg_t gregset_t[NGREG];
+
+/* TODO: fpregset_t. */
+
+#include <asm/sigcontext.h>
+typedef struct sigcontext mcontext_t;
+
+typedef struct ucontext {
+ unsigned long uc_flags;
+ struct ucontext* uc_link;
+ stack_t uc_stack;
+ mcontext_t uc_mcontext;
+ sigset_t uc_sigmask;
+ /* TODO: uc_regspace */
+} ucontext_t;
#elif defined(__arm64__)