aboutsummaryrefslogtreecommitdiff
path: root/lib/std/Thread.zig
AgeCommit message (Collapse)Author
4 daysstd: different way of doing some optionsAndrew Kelley
to avoid dependency loops
4 daysstd: integrate Io.Threaded with environment variablesAndrew Kelley
* std.option allows overriding the debug Io instance * if the default is used, start code initializes environ and argv0 also fix some places that needed recancel(), thanks mlugg! See #30562
4 daysstd: consolidate all instances of std.Io.Threaded into a singletonAndrew Kelley
It's better to avoid references to this global variable, but, in the cases where it's needed, such as in std.debug.print and collecting stack traces, better to share the same instance.
4 daysstd: update remaining unit tests for std.Io API changesAndrew Kelley
4 daysupdate all std.fs.cwd() to std.Io.Dir.cwd()Andrew Kelley
4 daysupdate all occurrences of openFile to receive an io instanceAndrew Kelley
4 daysupdate all occurrences of std.fs.File to std.Io.FileAndrew Kelley
4 daysupdate all occurrences of close() to close(io)Andrew Kelley
6 daysstd: delete Thread.Pool in favour of IoMatthew Lugg
2025-12-12windows: type safety improvements and more ntdll functionsJacob Young
2025-11-21std.Thread: update doc commentsAndrew Kelley
2025-11-20system specific errnorpkak
2025-11-16std.Thread: disable `thread local storage` test on 32-bit targetsAlex Rønne Petersen
https://github.com/ziglang/zig/issues/25498
2025-11-14represent Mac Catalyst as aarch64-maccatalyst-none rather than ↵Alex Rønne Petersen
aarch64-ios-macabi Apple's own headers and tbd files prefer to think of Mac Catalyst as a distinct OS target. Earlier, when DriverKit support was added to LLVM, it was represented a distinct OS. So why Apple decided to only represent Mac Catalyst as an ABI in the target triple is beyond me. But this isn't the first time they've ignored established target triple norms (see: armv7k and aarch64_32) and it probably won't be the last. While doing this, I also audited all Darwin OS prongs throughout the codebase and made sure they cover all the tags.
2025-10-31std.os.windows: eliminate forwarder function in kernel32 (#25766)qilme
#1840 kernel32.AddVectoredExceptionHandler -> ntdll.RtlAddVectoredExceptionHandler kernel32.RemoveVectoredExceptionHandler -> ntdll.RtlRemoveVectoredExceptionHandler kernel32.ExitProcess -> ntdll.RtlExitUserProcess kernel32.InitializeCriticalSection -> ntdll.RtlInitializeCriticalSection kernel32.EnterCriticalSection -> ntdll.RtlEnterCriticalSection kernel32.LeaveCriticalSection -> ntdll.RtlLeaveCriticalSection kernel32.DeleteCriticalSection -> ntdll.RtlDeleteCriticalSection kernel32.TryAcquireSRWLockExclusive -> ntdll.RtlTryAcquireSRWLockExclusive kernel32.AcquireSRWLockExclusive -> ntdll.RtlAcquireSRWLockExclusive kernel32.ReleaseSRWLockExclusive -> ntdll.RtlReleaseSRWLockExclusive kernel32.WakeConditionVariable -> ntdll.RtlWakeConditionVariable kernel32.WakeAllConditionVariable -> ntdll.RtlWakeAllConditionVariable kernel32.HeapReAlloc -> ntdll.RtlReAllocateHeap kernel32.HeapAlloc -> ntdll.RtlAllocateHeap
2025-10-29std.Io.Threaded: add ioBasic which disables networkingAndrew Kelley
2025-10-29std: back out the StackTrace byval changesAndrew Kelley
Let's keep passing this thing by pointer
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29std.fs: use BadPathName rather than InvalidWtf8 on WindowsAndrew Kelley
2025-10-29std.Io: implement dirStatPathAndrew Kelley
2025-10-29WIP: hack at std.Io on a planeAndrew Kelley
2025-10-29WIP land the std.Io interfaceAndrew Kelley
fix std lib compilation errors caused by introducing std.Io
2025-10-29std.Thread.ResetEvent: make it more reusableAndrew Kelley
2025-10-29std.Io: add asyncConcurrent and asyncParallelAndrew Kelley
2025-10-27remove all Oracle Solaris supportAlex Rønne Petersen
There is no straightforward way for the Zig team to access the Solaris system headers; to do this, one has to create an Oracle account, accept their EULA to download the installer ISO, and finally install it on a machine or VM. We do not have to jump through hoops like this for any other OS that we support, and no one on the team has expressed willingness to do it. As a result, we cannot audit any Solaris contributions to std.c or other similarly sensitive parts of the standard library. The best we would be able to do is assume that Solaris and illumos are 100% compatible with no way to verify that assumption. But at that point, the solaris and illumos OS tags would be functionally identical anyway. For Solaris especially, any contributions that involve APIs introduced after the OS was made closed-source would also be inherently more risky than equivalent contributions for other proprietary OSs due to the case of Google LLC v. Oracle America, Inc., wherein Oracle clearly demonstrated its willingness to pursue legal action against entities that merely copy API declarations. Finally, Oracle laid off most of the Solaris team in 2017; the OS has been in maintenance mode since, presumably to be retired completely sometime in the 2030s. For these reasons, this commit removes all Oracle Solaris support. Anyone who still wishes to use Zig on Solaris can try their luck by simply using illumos instead of solaris in target triples - chances are it'll work. But there will be no effort from the Zig team to support this use case; we recommend that people move to illumos instead.
2025-10-23std.Thread: implement freeAndExit() for sh-linuxAlex Rønne Petersen
2025-10-23std.Thread: implement freeAndExit() for microblaze-linuxAlex Rønne Petersen
2025-10-23std.Thread: implement freeAndExit() for hppa-linuxAlex Rønne Petersen
2025-10-23std.Thread: implement freeAndExit() for alpha-linuxAlex Rønne Petersen
2025-10-23std.Thread: implement freeAndExit() for m68k-linuxAlex Rønne Petersen
2025-10-19Merge pull request #25627 from alexrp/qemu-10.1.1-patchedAlex Rønne Petersen
`ci`: switch to patched QEMU 10.1.1.1
2025-10-18std.Thread: implement freeAndExit() for or1kAlex Rønne Petersen
2025-10-18Revert "std.Thread: disable test on armeb in addition to thumbeb"Alex Rønne Petersen
This reverts commit a73f246b2963de0024b9b7070448862e855d5a04.
2025-10-18std.Thread: fix some issues in x86_64/x32 inline asmAlex Rønne Petersen
Wrong syscall on x32; return exit code 0 instead of 1 on both. ref https://github.com/ziglang/zig/issues/22189
2025-10-18std.Thread: fix inline asm for mipsn32Alex Rønne Petersen
This was using the mips64 syscalls. ref https://github.com/ziglang/zig/issues/22189
2025-10-10replaced https://simonsapin.github.io/wtf-8/ with https://wtf-8.codeberg.page/usebeforefree
2025-09-30std: fixesmlugg
2025-09-25std.Thread: disable test on armeb in addition to thumbebAlex Rønne Petersen
Same falky failure on both. See ed7ff0b693037078f451a7c6c1124611060f4892.
2025-09-20allow some test cases to regressAndrew Kelley
tracked by #24061 - these should be re-enabled once that is solved.
2025-09-09Move some Thread tests out of posix/test.zig into Thread.zigPat Tullmann
These tests aren't (directly) using Posix APIs, so they don't need to be in posix/test.zig. Put them over with the code and tests in Thread.zig. Since the spawn/join test in the posix code was redundant, just dropped that one.
2025-08-30Merge pull request #25077 from ziglang/GenericReaderAndrew Kelley
std.Io: delete GenericReader, AnyReader, FixedBufferStream; and related API breakage
2025-08-30rework std.Io.Writer.Allocating to support runtime-known alignmentAndrew Kelley
Also, breaking API changes to: * std.fs.Dir.readFileAlloc * std.fs.Dir.readFileAllocOptions
2025-08-30std.Thread: make unreachable errors in sleep() clearerAlex Rønne Petersen
2025-08-29std.Io: delete GenericReaderAndrew Kelley
and delete deprecated alias std.io
2025-08-28std: delete most remaining uses of GenericWriterAndrew Kelley
2025-08-21drop NameTooLong from sysctlbynameZ error set (#24909)Sardorbek Imomaliev
2025-07-21std.Thread: don't spinAndrew Kelley
2025-07-16zig fmtAndrew Kelley
2025-07-12std.os.uefi.tables: ziggify boot and runtime services (#23441)Carmen
* std.os.uefi.tables: ziggify boot and runtime services * avoid T{} syntax Co-authored-by: linusg <mail@linusgroh.de> * misc fixes * work * self-review quickfixes * dont make MemoryMapSlice generic * more review fixes, work * more work * more work * review fixes * update boot/runtime services references throughout codebase * self-review fixes * couple of fixes i forgot to commit earlier * fixes from integrating in my own project * fixes from refAllDeclsRecursive * Apply suggestions from code review Co-authored-by: truemedian <truemedian@gmail.com> * more fixes from review * fixes from project integration * make natural alignment of Guid align-8 * EventRegistration is a new opaque type * fix getNextHighMonotonicCount * fix locateProtocol * fix exit * partly revert 7372d65 * oops exit data_len is num of bytes * fixes from project integration * MapInfo consistency, MemoryType update per review * turn EventRegistration back into a pointer * forgot to finish updating MemoryType methods * fix IntFittingRange calls * set uefi.Page nat alignment * Back out "set uefi.Page nat alignment" This backs out commit cdd9bd6f7f5fb763f994b8fbe3e1a1c2996a2393. * get rid of some error.NotFound-s * fix .exit call in panic * review comments, add format method * fix resetSystem data alignment * oops, didnt do a final refAllDeclsRecursive i guess * review comments * writergate update MemoryType.format * fix rename --------- Co-authored-by: linusg <mail@linusgroh.de> Co-authored-by: truemedian <truemedian@gmail.com>
2025-07-07std.fmt: breaking API changesAndrew Kelley
added adapter to AnyWriter and GenericWriter to help bridge the gap between old and new API make std.testing.expectFmt work at compile-time std.fmt no longer has a dependency on std.unicode. Formatted printing was never properly unicode-aware. Now it no longer pretends to be. Breakage/deprecations: * std.fs.File.reader -> std.fs.File.deprecatedReader * std.fs.File.writer -> std.fs.File.deprecatedWriter * std.io.GenericReader -> std.io.Reader * std.io.GenericWriter -> std.io.Writer * std.io.AnyReader -> std.io.Reader * std.io.AnyWriter -> std.io.Writer * std.fmt.format -> std.fmt.deprecatedFormat * std.fmt.fmtSliceEscapeLower -> std.ascii.hexEscape * std.fmt.fmtSliceEscapeUpper -> std.ascii.hexEscape * std.fmt.fmtSliceHexLower -> {x} * std.fmt.fmtSliceHexUpper -> {X} * std.fmt.fmtIntSizeDec -> {B} * std.fmt.fmtIntSizeBin -> {Bi} * std.fmt.fmtDuration -> {D} * std.fmt.fmtDurationSigned -> {D} * {} -> {f} when there is a format method * format method signature - anytype -> *std.io.Writer - inferred error set -> error{WriteFailed} - options -> (deleted) * std.fmt.Formatted - now takes context type explicitly - no fmt string