linux: update `sigmask` in every arch `ucontext_t`
All the existing code that manipulates `ucontext_t` expects there to be a
glibc-compatible sigmask (1024-bit). The `ucontext_t` struct need to be
cleaned up so the glibc-dependent format is only used when linking
glibc/musl library, but that is a more involved change.
In practice, no Zig code looks at the sigset field contents, so it just
needs to be the right size.
8 files changed, 8 insertions(+), 9 deletions(-)
lib
lib/std/os/linux/aarch64.zig+1-1
| ... | ... | @@ -289,7 +289,7 @@ pub const ucontext_t = extern struct { |
| 289 | 289 | flags: usize, |
| 290 | 290 | link: ?*ucontext_t, |
| 291 | 291 | stack: stack_t, |
| 292 | | sigmask: sigset_t, |
| 292 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 293 | 293 | mcontext: mcontext_t, |
| 294 | 294 | }; |
| 295 | 295 | |
lib/std/os/linux/arm.zig+1-1
| ... | ... | @@ -337,7 +337,7 @@ pub const ucontext_t = extern struct { |
| 337 | 337 | link: ?*ucontext_t, |
| 338 | 338 | stack: stack_t, |
| 339 | 339 | mcontext: mcontext_t, |
| 340 | | sigmask: sigset_t, |
| 340 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 341 | 341 | regspace: [64]u64, |
| 342 | 342 | }; |
| 343 | 343 | |
lib/std/os/linux/loongarch64.zig+1-2
| ... | ... | @@ -264,8 +264,7 @@ pub const ucontext_t = extern struct { |
| 264 | 264 | flags: c_ulong, |
| 265 | 265 | link: ?*ucontext_t, |
| 266 | 266 | stack: stack_t, |
| 267 | | sigmask: sigset_t, |
| 268 | | _pad: [1024 / 8 - @sizeOf(sigset_t)]u8, |
| 267 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 269 | 268 | mcontext: mcontext_t, |
| 270 | 269 | }; |
| 271 | 270 | |
lib/std/os/linux/powerpc.zig+1-1
| ... | ... | @@ -341,7 +341,7 @@ pub const ucontext_t = extern struct { |
| 341 | 341 | stack: stack_t, |
| 342 | 342 | pad: [7]i32, |
| 343 | 343 | regs: *mcontext_t, |
| 344 | | sigmask: sigset_t, |
| 344 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 345 | 345 | pad2: [3]i32, |
| 346 | 346 | mcontext: mcontext_t, |
| 347 | 347 | }; |
lib/std/os/linux/powerpc64.zig+1-1
| ... | ... | @@ -337,7 +337,7 @@ pub const ucontext_t = extern struct { |
| 337 | 337 | flags: u32, |
| 338 | 338 | link: ?*ucontext_t, |
| 339 | 339 | stack: stack_t, |
| 340 | | sigmask: sigset_t, |
| 340 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 341 | 341 | mcontext: mcontext_t, |
| 342 | 342 | }; |
| 343 | 343 | |
lib/std/os/linux/s390x.zig+1-1
| ... | ... | @@ -273,7 +273,7 @@ pub const ucontext_t = extern struct { |
| 273 | 273 | link: ?*ucontext_t, |
| 274 | 274 | stack: stack_t, |
| 275 | 275 | mcontext: mcontext_t, |
| 276 | | sigmask: sigset_t, |
| 276 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 277 | 277 | }; |
| 278 | 278 | |
| 279 | 279 | pub const mcontext_t = extern struct { |
lib/std/os/linux/sparc64.zig+1-1
| ... | ... | @@ -454,7 +454,7 @@ pub const ucontext_t = extern struct { |
| 454 | 454 | sigmask: u64, |
| 455 | 455 | mcontext: mcontext_t, |
| 456 | 456 | stack: stack_t, |
| 457 | | sigset: sigset_t, |
| 457 | sigset: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 458 | 458 | }; |
| 459 | 459 | |
| 460 | 460 | /// TODO |
lib/std/os/linux/x86.zig+1-1
| ... | ... | @@ -350,7 +350,7 @@ pub const ucontext_t = extern struct { |
| 350 | 350 | link: ?*ucontext_t, |
| 351 | 351 | stack: stack_t, |
| 352 | 352 | mcontext: mcontext_t, |
| 353 | | sigmask: sigset_t, |
| 353 | sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask |
| 354 | 354 | regspace: [64]u64, |
| 355 | 355 | }; |
| 356 | 356 | |