mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 22:35:24 +00:00
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.
This commit is contained in:
parent
120c4789c3
commit
cf989374e9
@ -289,7 +289,7 @@ pub const ucontext_t = extern struct {
|
||||
flags: usize,
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
mcontext: mcontext_t,
|
||||
};
|
||||
|
||||
|
||||
@ -337,7 +337,7 @@ pub const ucontext_t = extern struct {
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
mcontext: mcontext_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
regspace: [64]u64,
|
||||
};
|
||||
|
||||
|
||||
@ -264,8 +264,7 @@ pub const ucontext_t = extern struct {
|
||||
flags: c_ulong,
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
sigmask: sigset_t,
|
||||
_pad: [1024 / 8 - @sizeOf(sigset_t)]u8,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
mcontext: mcontext_t,
|
||||
};
|
||||
|
||||
|
||||
@ -341,7 +341,7 @@ pub const ucontext_t = extern struct {
|
||||
stack: stack_t,
|
||||
pad: [7]i32,
|
||||
regs: *mcontext_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
pad2: [3]i32,
|
||||
mcontext: mcontext_t,
|
||||
};
|
||||
|
||||
@ -337,7 +337,7 @@ pub const ucontext_t = extern struct {
|
||||
flags: u32,
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
mcontext: mcontext_t,
|
||||
};
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ pub const ucontext_t = extern struct {
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
mcontext: mcontext_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
};
|
||||
|
||||
pub const mcontext_t = extern struct {
|
||||
|
||||
@ -454,7 +454,7 @@ pub const ucontext_t = extern struct {
|
||||
sigmask: u64,
|
||||
mcontext: mcontext_t,
|
||||
stack: stack_t,
|
||||
sigset: sigset_t,
|
||||
sigset: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
};
|
||||
|
||||
/// TODO
|
||||
|
||||
@ -350,7 +350,7 @@ pub const ucontext_t = extern struct {
|
||||
link: ?*ucontext_t,
|
||||
stack: stack_t,
|
||||
mcontext: mcontext_t,
|
||||
sigmask: sigset_t,
|
||||
sigmask: [1024 / @bitSizeOf(c_ulong)]c_ulong, // Currently a libc-compatible (1024-bit) sigmask
|
||||
regspace: [64]u64,
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user