From 4e72fcc3c2b8bcaab653732dfd3edd137602c648 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 29 Jan 2014 17:53:59 -0800 Subject: [PATCH] Add arm . Change-Id: I14d435f9e3e82f77d8a7e886ff88c18f5d09d14a --- libc/include/sys/ucontext.h | 38 ++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/libc/include/sys/ucontext.h b/libc/include/sys/ucontext.h index fffd6b8cc..e7fbcd65f 100644 --- a/libc/include/sys/ucontext.h +++ b/libc/include/sys/ucontext.h @@ -36,7 +36,43 @@ __BEGIN_DECLS #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 +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__)