diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-05-29 19:38:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-05-29 19:38:01 -0400 |
| commit | c66a747045e660a7e8b8146f9ee28c89f3960940 (patch) | |
| tree | 6e9ccacd35f42d22f337d21b4e45ce1ffa6106b0 /std/os/bits/linux.zig | |
| parent | bfc86776d501dc317737be09e8ed8d13da18f67c (diff) | |
| parent | b8d1060f0a240a3907033490a3e6615f78334a97 (diff) | |
| download | zig-c66a747045e660a7e8b8146f9ee28c89f3960940.tar.gz zig-c66a747045e660a7e8b8146f9ee28c89f3960940.zip | |
Merge pull request #2546 from LemonBoy/sigaltstack
Add sigaltstack syscall for Linux
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 44e713b15f..4a1734a145 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, +}; |
