diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-05-28 15:22:19 +0200 |
|---|---|---|
| committer | LemonBoy <thatlemon@gmail.com> | 2019-05-28 15:22:19 +0200 |
| commit | bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7 (patch) | |
| tree | f70669bd50dbc98cde112ef14ac18078a56412ae /std/os/bits/linux.zig | |
| parent | d1b6f29d225bbedd0afb97fce64f5d042df4d9c6 (diff) | |
| download | zig-bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7.tar.gz zig-bcdbd8d1697725992cb08eb1c3c59bd63fda6dc7.zip | |
Add sigaltstack syscall
Diffstat (limited to 'std/os/bits/linux.zig')
| -rw-r--r-- | std/os/bits/linux.zig | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/std/os/bits/linux.zig b/std/os/bits/linux.zig index 6532e72362..b9386e9b05 100644 --- a/std/os/bits/linux.zig +++ b/std/os/bits/linux.zig @@ -929,3 +929,24 @@ pub fn CPU_COUNT(set: cpu_set_t) cpu_count_t { //#define CPU_COUNT(set) CPU_COUNT_S(sizeof(cpu_set_t),set) //#define CPU_ZERO(set) CPU_ZERO_S(sizeof(cpu_set_t),set) //#define CPU_EQUAL(s1,s2) CPU_EQUAL_S(sizeof(cpu_set_t),s1,s2) + +pub const MINSIGSTKSZ = switch (builtin.arch) { + .i386, .x86_64, .arm => 2048, + .aarch64 => 5120, + else => @compileError("MINSIGSTKSZ not defined for this architecture"), +}; +pub const SIGSTKSZ = switch (builtin.arch) { + .i386, .x86_64, .arm => 8192, + .aarch64 => 16384, + else => @compileError("SIGSTKSZ not defined for this architecture"), +}; + +pub const SS_ONSTACK = 1; +pub const SS_DISABLE = 2; +pub const SS_AUTODISARM = 1 << 31; + +pub const stack_t = extern struct { + ss_sp: [*]u8, + ss_flags: i32, + ss_size: isize, +}; |
