From 0f2612037784570930dea433afef559ff6161b21 Mon Sep 17 00:00:00 2001 From: Michael Dusan Date: Sun, 16 May 2021 15:59:34 -0400 Subject: overhaul elf csu (c-runtime startup) logic - more support for linux, android, freebsd, netbsd, openbsd, dragonfly - centralize musl utils; musl logic is no longer intertwined with csu - fix musl compilation to build crti/crtn for full archs list - fix openbsd to support `zig build-lib -dynamic` - initial dragonfly linking success (with a warning) ancillary: - fix emutls (openbsd) tests to use `try` --- lib/std/Thread.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/std/Thread.zig') diff --git a/lib/std/Thread.zig b/lib/std/Thread.zig index ad82e4beef..fbb3d927e2 100644 --- a/lib/std/Thread.zig +++ b/lib/std/Thread.zig @@ -576,6 +576,9 @@ pub fn getCurrentThreadId() u64 { assert(c.pthread_threadid_np(null, &thread_id) == 0); return thread_id; }, + .dragonfly => { + return @bitCast(u32, c.lwp_gettid()); + }, .netbsd => { return @bitCast(u32, c._lwp_self()); }, -- cgit v1.2.3