| author | |
| committer | |
| log | 1b9ffa0824198fc72b085ad99e9f27ad6f533f3a |
| tree | 03382a1f770b1a5d0f4d1da221fa095be04383a1 |
| parent | ba3b3528914f8e886b5fe2cba714de34c176a921 |
This reverts commit 41502c6aa53a3da31b276c23c4db74db7d04796b.12 files changed, 1 insertions(+), 48 deletions(-)
lib/std/Thread.zig+1-1| ... | @@ -695,7 +695,7 @@ const PosixThreadImpl = struct { | ... | @@ -695,7 +695,7 @@ const PosixThreadImpl = struct { |
| 695 | defer assert(c.pthread_attr_destroy(&attr) == .SUCCESS); | 695 | defer assert(c.pthread_attr_destroy(&attr) == .SUCCESS); |
| 696 | 696 | ||
| 697 | // Use the same set of parameters used by the libc-less impl. | 697 | // Use the same set of parameters used by the libc-less impl. |
| 698 | const stack_size = @max(config.stack_size, c.PTHREAD_STACK_MIN); | 698 | const stack_size = @max(config.stack_size, 16 * 1024); |
| 699 | assert(c.pthread_attr_setstacksize(&attr, stack_size) == .SUCCESS); | 699 | assert(c.pthread_attr_setstacksize(&attr, stack_size) == .SUCCESS); |
| 700 | assert(c.pthread_attr_setguardsize(&attr, std.mem.page_size) == .SUCCESS); | 700 | assert(c.pthread_attr_setguardsize(&attr, std.mem.page_size) == .SUCCESS); |
| 701 | 701 |
lib/std/c/darwin.zig-6| ... | @@ -4153,9 +4153,3 @@ pub const vm_extmod_statistics_t = *vm_extmod_statistics; | ... | @@ -4153,9 +4153,3 @@ pub const vm_extmod_statistics_t = *vm_extmod_statistics; |
| 4153 | pub const vm_extmod_statistics_data_t = vm_extmod_statistics; | 4153 | pub const vm_extmod_statistics_data_t = vm_extmod_statistics; |
| 4154 | 4154 | ||
| 4155 | pub extern "c" fn vm_stats(info: ?*anyopaque, count: *c_uint) kern_return_t; | 4155 | pub extern "c" fn vm_stats(info: ?*anyopaque, count: *c_uint) kern_return_t; |
| 4156 | |||
| 4157 | /// TODO refines if necessary | ||
| 4158 | pub const PTHREAD_STACK_MIN = switch (builtin.cpu.arch) { | ||
| 4159 | .arm, .aarch64 => 16 * 1024, | ||
| 4160 | else => 8 * 1024, | ||
| 4161 | }; |
lib/std/c/dragonfly.zig-2| ... | @@ -1160,5 +1160,3 @@ pub const sigevent = extern struct { | ... | @@ -1160,5 +1160,3 @@ pub const sigevent = extern struct { |
| 1160 | sigev_value: sigval, | 1160 | sigev_value: sigval, |
| 1161 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, | 1161 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, |
| 1162 | }; | 1162 | }; |
| 1163 | |||
| 1164 | pub const PTHREAD_STACK_MIN = 16 * 1024; |
lib/std/c/emscripten.zig-2| ... | @@ -9,5 +9,3 @@ pub const pthread_rwlock_t = extern struct { | ... | @@ -9,5 +9,3 @@ pub const pthread_rwlock_t = extern struct { |
| 9 | }; | 9 | }; |
| 10 | const __SIZEOF_PTHREAD_COND_T = 48; | 10 | const __SIZEOF_PTHREAD_COND_T = 48; |
| 11 | const __SIZEOF_PTHREAD_MUTEX_T = 28; | 11 | const __SIZEOF_PTHREAD_MUTEX_T = 28; |
| 12 | |||
| 13 | pub const PTHREAD_STACK_MIN = 2048; |
lib/std/c/freebsd.zig-6| ... | @@ -2818,9 +2818,3 @@ pub const ptrace_cs_remote = extern struct { | ... | @@ -2818,9 +2818,3 @@ pub const ptrace_cs_remote = extern struct { |
| 2818 | }; | 2818 | }; |
| 2819 | 2819 | ||
| 2820 | pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: [*:0]u8, data: c_int) c_int; | 2820 | pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: [*:0]u8, data: c_int) c_int; |
| 2821 | |||
| 2822 | /// TODO refines if necessary | ||
| 2823 | pub const PTHREAD_STACK_MIN = switch (builtin.cpu.arch) { | ||
| 2824 | .x86, .powerpc => 4 * 512, | ||
| 2825 | else => 4 * 1024, | ||
| 2826 | }; |
lib/std/c/haiku.zig-3| ... | @@ -1068,6 +1068,3 @@ pub const sigevent = extern struct { | ... | @@ -1068,6 +1068,3 @@ pub const sigevent = extern struct { |
| 1068 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, | 1068 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, |
| 1069 | sigev_notify_attributes: ?*pthread_attr_t, | 1069 | sigev_notify_attributes: ?*pthread_attr_t, |
| 1070 | }; | 1070 | }; |
| 1071 | |||
| 1072 | /// TODO refines if necessary | ||
| 1073 | pub const PTHREAD_STACK_MIN = 2 * 4096; |
lib/std/c/linux.zig-12| ... | @@ -350,18 +350,6 @@ const __SIZEOF_PTHREAD_MUTEX_T = switch (native_abi) { | ... | @@ -350,18 +350,6 @@ const __SIZEOF_PTHREAD_MUTEX_T = switch (native_abi) { |
| 350 | }; | 350 | }; |
| 351 | const __SIZEOF_SEM_T = 4 * @sizeOf(usize); | 351 | const __SIZEOF_SEM_T = 4 * @sizeOf(usize); |
| 352 | 352 | ||
| 353 | /// TODO refines if necessary | ||
| 354 | pub const PTHREAD_STACK_MIN = switch (native_abi) { | ||
| 355 | .musl, .musleabi, .musleabihf => 2048, | ||
| 356 | .gnu, .gnuabin32, .gnuabi64, .gnueabi, .gnueabihf, .gnux32 => switch (native_arch) { | ||
| 357 | .aarch64, .arm, .armeb, .powerpc, .powerpc64, .powerpc64le, .loongarch32, .loongarch64 => 131072, | ||
| 358 | .sparc64 => 24576, | ||
| 359 | else => 16 * 1024, | ||
| 360 | }, | ||
| 361 | .android => if (@sizeOf(usize) == 8) 16 * 1024 else 8 * 1024, | ||
| 362 | else => 16 * 1024, | ||
| 363 | }; | ||
| 364 | |||
| 365 | pub extern "c" fn pthread_setname_np(thread: std.c.pthread_t, name: [*:0]const u8) E; | 353 | pub extern "c" fn pthread_setname_np(thread: std.c.pthread_t, name: [*:0]const u8) E; |
| 366 | pub extern "c" fn pthread_getname_np(thread: std.c.pthread_t, name: [*:0]u8, len: usize) E; | 354 | pub extern "c" fn pthread_getname_np(thread: std.c.pthread_t, name: [*:0]u8, len: usize) E; |
| 367 | 355 |
lib/std/c/minix.zig-2| ... | @@ -16,5 +16,3 @@ const __SIZEOF_PTHREAD_MUTEX_T = switch (builtin.abi) { | ... | @@ -16,5 +16,3 @@ const __SIZEOF_PTHREAD_MUTEX_T = switch (builtin.abi) { |
| 16 | }, | 16 | }, |
| 17 | else => unreachable, | 17 | else => unreachable, |
| 18 | }; | 18 | }; |
| 19 | |||
| 20 | pub const PTHREAD_STACK_MIN = 16 * 1024; |
lib/std/c/netbsd.zig-3| ... | @@ -1720,6 +1720,3 @@ pub const PIOD = struct { | ... | @@ -1720,6 +1720,3 @@ pub const PIOD = struct { |
| 1720 | }; | 1720 | }; |
| 1721 | 1721 | ||
| 1722 | pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: ?*anyopaque, data: c_int) c_int; | 1722 | pub extern "c" fn ptrace(request: c_int, pid: pid_t, addr: ?*anyopaque, data: c_int) c_int; |
| 1723 | |||
| 1724 | /// TODO refines if necessary | ||
| 1725 | pub const PTHREAD_STACK_MIN = 16 * 1024; |
lib/std/c/openbsd.zig-7| ... | @@ -1634,10 +1634,3 @@ pub const HW = struct { | ... | @@ -1634,10 +1634,3 @@ pub const HW = struct { |
| 1634 | pub const NCPUONLINE = 25; | 1634 | pub const NCPUONLINE = 25; |
| 1635 | pub const POWER = 26; | 1635 | pub const POWER = 26; |
| 1636 | }; | 1636 | }; |
| 1637 | |||
| 1638 | /// TODO refines if necessary | ||
| 1639 | pub const PTHREAD_STACK_MIN = switch (builtin.cpu.arch) { | ||
| 1640 | .sparc64 => 1 << 13, | ||
| 1641 | .mips64 => 1 << 14, | ||
| 1642 | else => 1 << 12, | ||
| 1643 | }; |
lib/std/c/solaris.zig-2| ... | @@ -1946,5 +1946,3 @@ pub const sigevent = extern struct { | ... | @@ -1946,5 +1946,3 @@ pub const sigevent = extern struct { |
| 1946 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, | 1946 | sigev_notify_function: ?*const fn (sigval) callconv(.C) void, |
| 1947 | sigev_notify_attributes: ?*pthread_attr_t, | 1947 | sigev_notify_attributes: ?*pthread_attr_t, |
| 1948 | }; | 1948 | }; |
| 1949 | |||
| 1950 | pub const PTHREAD_STACK_MIN = if (@sizeOf(usize) == 8) 8 * 1024 else 4 * 1024; |
lib/std/c/wasi.zig-2| ... | @@ -119,5 +119,3 @@ pub const POLL = struct { | ... | @@ -119,5 +119,3 @@ pub const POLL = struct { |
| 119 | pub const HUP = 0x2000; | 119 | pub const HUP = 0x2000; |
| 120 | pub const NVAL = 0x4000; | 120 | pub const NVAL = 0x4000; |
| 121 | }; | 121 | }; |
| 122 | |||
| 123 | pub const PTHREAD_STACK_MIN = 16 * 1024; |