| author | |
| committer | |
| log | fd2d4507c86057bf43ae2198edeb3ebddfa6caca |
| tree | 5fb4a65f7ccd18c278ac9d636eb5268502134d22 |
| parent | 07114e6bc69106fb77beb879a8a2f78a4ba4b256 |
| signature |
Closes #24239.2 files changed, 72 insertions(+), 4 deletions(-)
lib/std/os/linux/riscv32.zig+36-2| ... | @@ -7,6 +7,8 @@ const SYS = linux.SYS; | ... | @@ -7,6 +7,8 @@ const SYS = linux.SYS; |
| 7 | const uid_t = std.os.linux.uid_t; | 7 | const uid_t = std.os.linux.uid_t; |
| 8 | const gid_t = std.os.linux.gid_t; | 8 | const gid_t = std.os.linux.gid_t; |
| 9 | const pid_t = std.os.linux.pid_t; | 9 | const pid_t = std.os.linux.pid_t; |
| 10 | const stack_t = linux.stack_t; | ||
| 11 | const sigset_t = linux.sigset_t; | ||
| 10 | const sockaddr = linux.sockaddr; | 12 | const sockaddr = linux.sockaddr; |
| 11 | const socklen_t = linux.socklen_t; | 13 | const socklen_t = linux.socklen_t; |
| 12 | const timespec = std.os.linux.timespec; | 14 | const timespec = std.os.linux.timespec; |
| ... | @@ -261,8 +263,40 @@ pub const VDSO = struct { | ... | @@ -261,8 +263,40 @@ pub const VDSO = struct { |
| 261 | pub const CGT_VER = "LINUX_4.15"; | 263 | pub const CGT_VER = "LINUX_4.15"; |
| 262 | }; | 264 | }; |
| 263 | 265 | ||
| 264 | /// TODO | 266 | pub const f_ext_state = extern struct { |
| 265 | pub const ucontext_t = void; | 267 | f: [32]f32, |
| 268 | fcsr: u32, | ||
| 269 | }; | ||
| 270 | |||
| 271 | pub const d_ext_state = extern struct { | ||
| 272 | f: [32]f64, | ||
| 273 | fcsr: u32, | ||
| 274 | }; | ||
| 275 | |||
| 276 | pub const q_ext_state = extern struct { | ||
| 277 | f: [32]f128, | ||
| 278 | fcsr: u32, | ||
| 279 | _reserved: [3]u32, | ||
| 280 | }; | ||
| 281 | |||
| 282 | pub const fpstate = extern union { | ||
| 283 | f: f_ext_state, | ||
| 284 | d: d_ext_state, | ||
| 285 | q: q_ext_state, | ||
| 286 | }; | ||
| 287 | |||
| 288 | pub const mcontext_t = extern struct { | ||
| 289 | gregs: [32]u32, | ||
| 290 | fpregs: fpstate, | ||
| 291 | }; | ||
| 292 | |||
| 293 | pub const ucontext_t = extern struct { | ||
| 294 | flags: c_ulong, | ||
| 295 | link: ?*ucontext_t, | ||
| 296 | stack: stack_t, | ||
| 297 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask | ||
| 298 | mcontext: mcontext_t, | ||
| 299 | }; | ||
| 266 | 300 | ||
| 267 | /// TODO | 301 | /// TODO |
| 268 | pub const getcontext = {}; | 302 | pub const getcontext = {}; |
lib/std/os/linux/riscv64.zig+36-2| ... | @@ -7,6 +7,8 @@ const SYS = linux.SYS; | ... | @@ -7,6 +7,8 @@ const SYS = linux.SYS; |
| 7 | const uid_t = std.os.linux.uid_t; | 7 | const uid_t = std.os.linux.uid_t; |
| 8 | const gid_t = std.os.linux.gid_t; | 8 | const gid_t = std.os.linux.gid_t; |
| 9 | const pid_t = std.os.linux.pid_t; | 9 | const pid_t = std.os.linux.pid_t; |
| 10 | const stack_t = linux.stack_t; | ||
| 11 | const sigset_t = linux.sigset_t; | ||
| 10 | const sockaddr = linux.sockaddr; | 12 | const sockaddr = linux.sockaddr; |
| 11 | const socklen_t = linux.socklen_t; | 13 | const socklen_t = linux.socklen_t; |
| 12 | const timespec = std.os.linux.timespec; | 14 | const timespec = std.os.linux.timespec; |
| ... | @@ -261,8 +263,40 @@ pub const VDSO = struct { | ... | @@ -261,8 +263,40 @@ pub const VDSO = struct { |
| 261 | pub const CGT_VER = "LINUX_4.15"; | 263 | pub const CGT_VER = "LINUX_4.15"; |
| 262 | }; | 264 | }; |
| 263 | 265 | ||
| 264 | /// TODO | 266 | pub const f_ext_state = extern struct { |
| 265 | pub const ucontext_t = void; | 267 | f: [32]f32, |
| 268 | fcsr: u32, | ||
| 269 | }; | ||
| 270 | |||
| 271 | pub const d_ext_state = extern struct { | ||
| 272 | f: [32]f64, | ||
| 273 | fcsr: u32, | ||
| 274 | }; | ||
| 275 | |||
| 276 | pub const q_ext_state = extern struct { | ||
| 277 | f: [32]f128, | ||
| 278 | fcsr: u32, | ||
| 279 | _reserved: [3]u32, | ||
| 280 | }; | ||
| 281 | |||
| 282 | pub const fpstate = extern union { | ||
| 283 | f: f_ext_state, | ||
| 284 | d: d_ext_state, | ||
| 285 | q: q_ext_state, | ||
| 286 | }; | ||
| 287 | |||
| 288 | pub const mcontext_t = extern struct { | ||
| 289 | gregs: [32]u64, | ||
| 290 | fpregs: fpstate, | ||
| 291 | }; | ||
| 292 | |||
| 293 | pub const ucontext_t = extern struct { | ||
| 294 | flags: c_ulong, | ||
| 295 | link: ?*ucontext_t, | ||
| 296 | stack: stack_t, | ||
| 297 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask | ||
| 298 | mcontext: mcontext_t, | ||
| 299 | }; | ||
| 266 | 300 | ||
| 267 | /// TODO | 301 | /// TODO |
| 268 | pub const getcontext = {}; | 302 | pub const getcontext = {}; |