summaryrefslogtreecommitdiff
path: root/libc/sysdeps/linux/xtensa/ucontext_i.sym
diff options
context:
space:
mode:
authorMax Filippov <jcmvbkbc@gmail.com>2022-06-17 02:40:11 -0700
committerWaldemar Brodkorb <wbx@openadk.org>2022-06-20 12:17:17 +0200
commit6561433a6680b34c04dd4581e340f96cc7dfb04c (patch)
tree256e5adccc7312c7cd54e4401c3d0a850d350852 /libc/sysdeps/linux/xtensa/ucontext_i.sym
parent6d45c0fe89e6de7d35a991051ec7f9feaaaf3729 (diff)
xtensa: implement user context manipulation functions
Implement getcontext, makecontext, setcontext and swapcontext. Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'libc/sysdeps/linux/xtensa/ucontext_i.sym')
-rw-r--r--libc/sysdeps/linux/xtensa/ucontext_i.sym15
1 files changed, 15 insertions, 0 deletions
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 <inttypes.h>
+#include <signal.h>
+#include <stddef.h>
+#include <sys/ucontext.h>
+
+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)