diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2021-05-16 15:59:34 -0400 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-23 15:38:57 -0400 |
| commit | 0f2612037784570930dea433afef559ff6161b21 (patch) | |
| tree | d60fbc768c7460ac6874ed937eac38f8fe345842 /lib/std/Thread.zig | |
| parent | 44e480aa2cef24a0a9edbc5d24991f9432a255e3 (diff) | |
| download | zig-0f2612037784570930dea433afef559ff6161b21.tar.gz zig-0f2612037784570930dea433afef559ff6161b21.zip | |
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`
Diffstat (limited to 'lib/std/Thread.zig')
| -rw-r--r-- | lib/std/Thread.zig | 3 |
1 files changed, 3 insertions, 0 deletions
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()); }, |
