From 6561433a6680b34c04dd4581e340f96cc7dfb04c Mon Sep 17 00:00:00 2001 From: Max Filippov Date: Fri, 17 Jun 2022 02:40:11 -0700 Subject: xtensa: implement user context manipulation functions Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov --- libc/sysdeps/linux/xtensa/ucontext_i.sym | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 libc/sysdeps/linux/xtensa/ucontext_i.sym (limited to 'libc/sysdeps/linux/xtensa/ucontext_i.sym') diff --git a/libc/sysdeps/linux/xtensa/ucontext_i.sym b/libc/sysdeps/linux/xtensa/ucontext_i.sym new file mode 100644 index 000000000..4770c36c9 --- /dev/null +++ b/libc/sysdeps/linux/xtensa/ucontext_i.sym @@ -0,0 +1,15 @@ +#include +#include +#include +#include + +SIG_BLOCK +SIG_SETMASK + +-- Offsets of the fields in the ucontext_t structure. +#define ucontext(member) offsetof (ucontext_t, member) +#define mcontext(member) ucontext (uc_mcontext.member) + +UCONTEXT_SIGMASK ucontext (uc_sigmask) +MCONTEXT_SC_A_0 mcontext (sc_a[0]) +MCONTEXT_SC_PC mcontext (sc_pc) -- cgit v1.2.3