aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
AgeCommit message (Collapse)Author
2021-12-19stage1, stage2: rename c_void to anyopaque (#10316)Isaac Freund
zig fmt now replaces c_void with anyopaque to make updating code easy.
2021-12-03Merge pull request #9910 from mikdusan/dragonflyAndrew Kelley
dragonfly: port Thread.setname/getname
2021-11-30allocgate: renamed getAllocator function to allocatorLee Cannon
2021-11-30allocgate: std Allocator interface refactorLee Cannon
2021-11-30std lib API deprecations for the upcoming 0.9.0 releaseAndrew Kelley
See #3811
2021-11-15updates for haiku stdcAl Hoang
* add team_info, area_info * update signature for get_next_image_info * add error checks for haiku system calls * update and cleanup of haiku constants
2021-10-10SPARCv9: Fix freeAndExit implementationKoakuma
This fixes the wrong branch target and register check. (https://github.com/ziglang/zig/issues/9801)
2021-10-09housekeeping: return error.UnsupportedMichael Dusan
Return error at end of std.Thread.setName/getName to simplify flow-control.
2021-10-09dragonfly: port std.Thread.setname/getnameMichael Dusan
2021-09-24Initial bringup of the Solaris/Illumos portStephen Gregoratto
2021-09-01std.os reorg: regression fixes to stack_t, and std.ThreadAndrew Kelley
2021-09-01std.os reorg: more fixes caught by CIAndrew Kelley
2021-09-01std.os: more reorganization effortsAndrew Kelley
* std lib tests are passing on x86_64-linux with and without -lc * stage2 is building from source on x86_64-linux * down to 38 remaining uses of `usingnamespace`
2021-08-29zig fmt: respect trailing commas in inline assemblyjdmichaud
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
We already have a LICENSE file that covers the Zig Standard Library. We no longer need to remind everyone that the license is MIT in every single file. Previously this was introduced to clarify the situation for a fork of Zig that made Zig's LICENSE file harder to find, and replaced it with their own license that required annual payments to their company. However that fork now appears to be dead. So there is no need to reinforce the copyright notice in every single file.
2021-08-24Linux/SPARCv9: account for branch delay in freeAndExit()Koakuma
2021-08-24std: [breaking] move errno to become an nonexhaustive enumAndrew Kelley
The primary purpose of this change is to eliminate one usage of `usingnamespace` in the standard library - specifically the usage for errno values in `std.os.linux`. This is accomplished by truncating the `E` prefix from error values, and making errno a proper enum. A similar strategy can be used to eliminate some other `usingnamespace` sites in the std lib.
2021-08-09Merge remote-tracking branch 'origin' into libc-wasi-testTakeshi Yoneda
2021-07-30Add freeAndExit() implementation for Linux/SPARCv9Koakuma
2021-07-29thread: implement setName/getNameVincent Rischmann
2021-07-27WASI,libc: enable tests.Takeshi Yoneda
Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
2021-07-20stage2: miscellaneous fixes for the branchAndrew Kelley
* Breaking language change: inline assembly must use string literal syntax. This is in preparation for inline assembly improvements that involve more integration with the Zig language. This means we cannot rely on text substitution. * Liveness: properly handle inline assembly and function calls with more than 3 operands. - More than 35 operands is not yet supported. This is a low priority to implement. - This required implementation in codegen.zig as well. * Liveness: fix bug causing incorrect tomb bits. * Sema: enable switch expressions that are evaluated at compile-time. - Runtime switch instructions still need to be reworked in this branch. There was a TODO left here (by me) with a suggestion to do some bigger changes as part of the AIR memory reworking. Now that time has come and I plan to honor the suggestion in a future commit before merging this branch. * AIR printing: fix missing ')' on alive instructions. We're back to "hello world" working for the x86_64 backend.
2021-07-03zig fmtkprotty
2021-07-01std.Thread: move linux detach code to inline asmkprotty
2021-06-30zig fmtkprotty
2021-06-30std.Thread: non-zero child_tid to avoid racy join()kprotty
2021-06-30std.Thread: add CLONE_CHILD_SETTID to fix join()kprotty
2021-06-30std.Thread: fix tls 9386 linux typokprotty
2021-06-30std.Thread: more cleanup & testingkprotty
2021-06-30std.Thread: more fixeskprotty
2021-06-30std.Thread: fix posixkprotty
2021-06-30std.Thread: fix futex test + thread errorskprotty
2021-06-30std.Thread: more typo fixeskprotty
2021-06-30std.Thread: more fixeskprotty
2021-06-30std.Thread: typo fixes 2kprotty
2021-06-30std.Thread: uh more typo fixeskprotty
2021-06-30std.Thread: more compile error fixeskprotty
2021-06-30std.Thread: fix some typoskprotty
2021-06-30std.Thread: add tests + getCurrentId() returns ints when possiblekprotty
2021-06-30std.Thread: another typo fixkprotty
2021-06-30std.Thread: rewrite + extensionskprotty
2021-06-21std, src, doc, test: remove unused variablesJacob G-W
2021-06-12std.Thread.Futex addition (#9070)protty
* std.Thread.Futex: implementation + tests * std.Thread.Futex: fix darwin compile errors * std.Thread.Futex: fix wait() documentation typo * std.Thread.Futex: fix darwin version check * std.Thread.Futex: remove unnecessary comptime keyword
2021-05-31std.sync.atomic: extended atomic helper functions (#8866)protty
- deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint` - added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int - in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer - added fence() and compilerFence() to std.atomic
2021-05-23overhaul elf csu (c-runtime startup) logicMichael Dusan
- 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`
2021-05-20Run `zig fmt` on src/ and lib/std/Isaac Freund
This replaces callconv(.Inline) with the more idiomatic inline keyword.
2021-05-03std: Add fallback on pre-v6 ARM targetsLemonBoy
Thanks xackus for noticing the missing else branch.
2021-05-03std: Fix missing CPU feature checkLemonBoy
We need both the v6k and the v6m checks.
2021-04-30std: Improve spinloop hintLemonBoy
* Add a yield pattern for PowerPC64 * Fix compile error on pre-v6 ARM targets * Use isb instead of yield on AArch64 to give the CPU a chance to enter low-power states. * Make the hint an inline function, the call overhead can be avoided.
2021-04-26Revert "thread: simplify and remove useless return in spawn (#8621)"Andrew Kelley
This reverts commit 77cb45f59f7b37c316af1762298d6032e2b130b5. Zig's error return traces will point to the return token if they happen to occur, so having multiple return statements makes those stack traces really helpful. This destroys debuggability.