aboutsummaryrefslogtreecommitdiff
path: root/lib/std/c.zig
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2025-10-24 13:05:13 -0700
committerAndrew Kelley <andrew@ziglang.org>2025-10-29 06:20:51 -0700
commita8f95e5176ebd734ccd2fd4d92cced6ab4cc2c07 (patch)
tree1760bdd8a879a46cccc87ab71002e78b318b7aec /lib/std/c.zig
parent85e159e652afe976a6f720e041e88b196f062a9f (diff)
downloadzig-a8f95e5176ebd734ccd2fd4d92cced6ab4cc2c07.tar.gz
zig-a8f95e5176ebd734ccd2fd4d92cced6ab4cc2c07.zip
std.Io.Threaded: implement cancellation for pthreads
not to be confused with pthread_cancel, which is a useless API.
Diffstat (limited to 'lib/std/c.zig')
-rw-r--r--lib/std/c.zig2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/std/c.zig b/lib/std/c.zig
index 877b9ae4e3..024c76ddc4 100644
--- a/lib/std/c.zig
+++ b/lib/std/c.zig
@@ -10763,6 +10763,8 @@ pub const pthread_setname_np = switch (native_os) {
};
pub extern "c" fn pthread_getname_np(thread: pthread_t, name: [*:0]u8, len: usize) c_int;
+pub extern "c" fn pthread_kill(pthread_t, signal: c_int) c_int;
+
pub const pthread_threadid_np = switch (native_os) {
.macos, .ios, .tvos, .watchos, .visionos => private.pthread_threadid_np,
else => {},