authorgravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-21 22:54:39+02:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2024-07-23 21:14:19+02:00
logfcbb192b4909ecbaedc7a148e8006ba6e57c06b8
treedfcb4453751fa8a9a48c8ee777e5a93eb25cad71
parentb21de4de5e031fdca56d5e5d5a582ce233240f89
signaturebadge-check Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

std.os.linux: Define (MIN)SIGSTKSZ for all supported Linux architectures.


1 files changed, 63 insertions(+), 4 deletions(-)

lib/std/os/linux.zig+63-4
...@@ -4787,13 +4787,72 @@ pub fn CPU_COUNT(set: cpu_set_t) cpu_count_t {...@@ -4787,13 +4787,72 @@ pub fn CPU_COUNT(set: cpu_set_t) cpu_count_t {
4787}4787}
47884788
4789pub const MINSIGSTKSZ = switch (native_arch) {4789pub const MINSIGSTKSZ = switch (native_arch) {
4790 .x86, .x86_64, .arm, .mipsel => 2048,4790 .arc,
4791 .aarch64 => 5120,4791 .arm,
4792 .armeb,
4793 .csky,
4794 .hexagon,
4795 .m68k,
4796 .mips,
4797 .mipsel,
4798 .mips64,
4799 .mips64el,
4800 .powerpc,
4801 .powerpcle,
4802 .riscv32,
4803 .riscv64,
4804 .s390x,
4805 .thumb,
4806 .thumbeb,
4807 .x86,
4808 .x86_64,
4809 .xtensa,
4810 => 2048,
4811 .loongarch64,
4812 .sparc,
4813 .sparcel,
4814 .sparc64,
4815 => 4096,
4816 .aarch64,
4817 .aarch64_be,
4818 => 5120,
4819 .powerpc64,
4820 .powerpc64le,
4821 => 8192,
4792 else => @compileError("MINSIGSTKSZ not defined for this architecture"),4822 else => @compileError("MINSIGSTKSZ not defined for this architecture"),
4793};4823};
4794pub const SIGSTKSZ = switch (native_arch) {4824pub const SIGSTKSZ = switch (native_arch) {
4795 .x86, .x86_64, .arm, .mipsel => 8192,4825 .arc,
4796 .aarch64 => 16384,4826 .arm,
4827 .armeb,
4828 .csky,
4829 .hexagon,
4830 .m68k,
4831 .mips,
4832 .mipsel,
4833 .mips64,
4834 .mips64el,
4835 .powerpc,
4836 .powerpcle,
4837 .riscv32,
4838 .riscv64,
4839 .s390x,
4840 .thumb,
4841 .thumbeb,
4842 .x86,
4843 .x86_64,
4844 .xtensa,
4845 => 8192,
4846 .aarch64,
4847 .aarch64_be,
4848 .loongarch64,
4849 .sparc,
4850 .sparcel,
4851 .sparc64,
4852 => 16384,
4853 .powerpc64,
4854 .powerpc64le,
4855 => 32768,
4797 else => @compileError("SIGSTKSZ not defined for this architecture"),4856 else => @compileError("SIGSTKSZ not defined for this architecture"),
4798};4857};
47994858