summaryrefslogtreecommitdiff
path: root/lib/mlibc/options/glibc/include/sys/user.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 17:28:32 -0500
commitbd5969fc876a10b18613302db7087ef3c40f18e1 (patch)
tree7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/glibc/include/sys/user.h
parenta95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff)
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/glibc/include/sys/user.h')
-rw-r--r--lib/mlibc/options/glibc/include/sys/user.h49
1 files changed, 49 insertions, 0 deletions
diff --git a/lib/mlibc/options/glibc/include/sys/user.h b/lib/mlibc/options/glibc/include/sys/user.h
new file mode 100644
index 0000000..9a07ac6
--- /dev/null
+++ b/lib/mlibc/options/glibc/include/sys/user.h
@@ -0,0 +1,49 @@
+#ifndef _SYS_USER_H
+#define _SYS_USER_H
+
+#include <stdint.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct user_fpregs_struct {
+ uint16_t cwd, swd, ftw, fop;
+ uint64_t rip, rdp;
+ uint32_t mxcsr, mxcr_mask;
+ uint32_t st_space[32], xmm_space[64], padding[24];
+} elf_fpregset_t;
+
+struct user_regs_struct {
+ unsigned long r15, r14, r13, r12, rbp, rbx, r11, r10, r9, r8;
+ unsigned long rax, rcx, rdx, rsi, rdi, orig_rax, rip;
+ unsigned long cs, eflags, rsp, ss, fs_base, gs_base, ds, es, fs, gs;
+};
+
+struct user {
+ struct user_regs_struct regs;
+ int u_fpvalid;
+ struct user_fpregs_struct i387;
+ unsigned long u_tsize;
+ unsigned long u_dsize;
+ unsigned long u_ssize;
+ unsigned long start_code;
+ unsigned long start_stack;
+ long signal;
+ int reserved;
+ struct user_regs_struct *u_ar0;
+ struct user_fpregs_struct *u_fpstate;
+ unsigned long magic;
+ char u_comm[32];
+ unsigned long u_debugreg[8];
+};
+
+#ifdef __cplusplus
+}
+#endif
+
+#define PAGE_SHIFT 12
+#define PAGE_SIZE (1UL << PAGE_SHIFT)
+#define PAGE_MASK (~(PAGE_SIZE - 1))
+
+#endif