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__)