From 0a72eff002f28fa0aff761a4912789a468421042 Mon Sep 17 00:00:00 2001 From: Ariadne Conill Date: Sun, 13 Feb 2022 09:06:58 +0000 Subject: [PATCH] or1k: add freestanding bits --- arch/or1k/include/libucontext/bits.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 arch/or1k/include/libucontext/bits.h diff --git a/arch/or1k/include/libucontext/bits.h b/arch/or1k/include/libucontext/bits.h new file mode 100644 index 0000000..650351e --- /dev/null +++ b/arch/or1k/include/libucontext/bits.h @@ -0,0 +1,28 @@ +#ifndef LIBUCONTEXT_BITS_H +#define LIBUCONTEXT_BITS_H + +typedef struct sigaltstack { + void *ss_sp; + int ss_flags; + size_t ss_size; +} libucontext_stack_t; + +typedef int libucontext_greg_t, libucontext_gregset_t[32]; + +typedef struct { + struct { + libucontext_gregset_t gpr; + libucontext_greg_t pc; + libucontext_greg_t sr; + } regs; + unsigned long oldmask; +} libucontext_mcontext_t; + +typedef struct libucontext_ucontext { + unsigned long uc_flags; + struct libucontext_ucontext *uc_link; + libucontext_stack_t uc_stack; + libucontext_mcontext_t uc_mcontext; +} libucontext_ucontext_t; + +#endif