aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
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-30Merge pull request #25763 from mrjbq7/cancelledJohn Benediktsson
rename Cancelled to Canceled
2025-10-29Merge pull request #25592 from ziglang/init-std.IoAndrew Kelley
std: Introduce `Io` Interface
2025-10-29std.os.linux: fix restore for powerpc/powerpc64Alex Rønne Petersen
sigreturn and rt_sigreturn are distinct syscalls on PowerPC.
2025-10-29std.os.linux.IoUring: disable failing testAndrew Kelley
tracked by https://github.com/ziglang/zig/issues/25734
2025-10-29std.os.linux.s390x: fix restore functionAndrew Kelley
2025-10-29std.os.linux.x86: fix signal restore functionAndrew Kelley
After handling any signal on x86, it would previously segfault.
2025-10-29std: fix definition of ws2_32.GetAddrInfoExWAndrew Kelley
There was a missing parameter.
2025-10-29std: make signal numbers into an enumAndrew Kelley
fixes start logic for checking whether IO/POLL exist
2025-10-29std.Io.Threaded: fix openSelfExe for WindowsAndrew Kelley
missing a call to wToPrefixedFileW
2025-10-29std.os.linux.IoUring: use linux msghdrAndrew Kelley
it disagrees with posix msghdr
2025-10-29std.Io.Threaded: delete Windows implementation of if_nametoindexAndrew Kelley
Microsoft documentation says "The if_nametoindex function is implemented for portability of applications with Unix environments, but the ConvertInterface functions are preferred." This was also the only dependency on iphlpapi.
2025-10-29std.Io.Threaded: implement netLookup for WindowsAndrew Kelley
2025-10-29std.os.windows.ws2_32: remove 'A' variantsAndrew Kelley
2025-10-29std.Io.Threaded: fix compilation failures on WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement netAccept for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement netListen for WindowsAndrew Kelley
2025-10-29std.Io.Threaded: implement dirAccess for WindowsAndrew Kelley
2025-10-29std: fix compilation errors on WindowsAndrew Kelley
2025-10-29std: move some windows path checking logicAndrew Kelley
2025-10-29std.fs: use BadPathName rather than InvalidWtf8 on WindowsAndrew Kelley
2025-10-29fix miscellaneous compilation errorsAndrew Kelley
- ILSEQ -> error.BadPathName - implement dirStatPath for WASI
2025-10-29std: move DNS record enum to a better namespaceAndrew Kelley
2025-10-29std: fix macos compilation errorsAndrew Kelley
2025-10-29std: fix some Io compilation errorsAndrew Kelley
2025-10-29std: updating to std.Io interfaceAndrew Kelley
got the build runner compiling
2025-10-29std: fix msghdr and cmsghdr when using musl libcAndrew Kelley
glibc and linux kernel use size_t for some field lengths while POSIX and musl use int. This bug would have caused breakage the first time someone tried to call sendmsg on a 64-bit big endian system when linking musl libc. my opinion: * msghdr.iovlen: kernel and glibc have it right. This field should definitely be size_t. With int, the padding bytes are wasted for no reason. * msghdr.controllen: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes next to flags. * cmsghdr.len: POSIX and musl have it right. 4 bytes is plenty for the length, and it saves 4 bytes since the other fields are also 32-bits each.
2025-10-29std.Io: implement netSendAndrew Kelley
2025-10-29std.os.linux: remove unnecessary warnings from sendmmsgAndrew Kelley
The one about INT_MAX is self-evident from the type system. The one about kernel having bad types doesn't seem accurate as I checked the source code and it uses size_t for all the appropriate types, matching the libc struct definition for msghdr and msghdr_const.
2025-10-29std.os.linux: remove sendmmsg workaroundAndrew Kelley
This "fix" is too opinionated to belong here. Better instead to document the pitfalls.
2025-10-27fix: make `compiler_rt` and `std.Io.Writer` compile on 16-bit platforms.GasInfinity
2025-10-23std.os.linux.tls: add hppa supportAlex Rønne Petersen
Turns out Linux on PA-RISC does system calls in a pretty fascinating way; see arch/parisc/kernel/syscall.S for details.
2025-10-23std.os.linux.tls: add sh supportAlex Rønne Petersen
2025-10-23std.os.linux.tls: add microblaze supportAlex Rønne Petersen
Implemented according to glibc because I'm pretty sure musl gets it wrong.
2025-10-23std.os.linux.tls: add alpha supportAlex Rønne Petersen
2025-10-23std.Target: add arceb and xtensaeb Cpu.Arch tagsAlex Rønne Petersen
2025-10-19std.os.linux: add pivot_root syscallWim de With
2025-10-19std.os.linux: add setns syscallWim de With
2025-10-18std.os.linux: add or1k arch bitsAlex Rønne Petersen
2025-10-18std.os.linux.tls: implement or1k supportAlex Rønne Petersen
2025-10-18Merge pull request #25622 from alexrp/inline-asm-fixesAlex Rønne Petersen
`std`: some miscellaneous inline asm fixes for mips, mips64, mipsn32, and x32
2025-10-18Merge pull request #25614 from squeek502/windows-rename-deleteAlex Rønne Petersen
windows: Always try using POSIX_SEMANTICS/etc for rename/delete
2025-10-18std.os.linux: remove syscall7() on mips64/mipsn32Alex Rønne Petersen
I'm not sure why this was here, but this is only a thing on O32, not N32/N64.
2025-10-18std.os.linux: fix some issues in x32 inline asmAlex Rønne Petersen
ref https://github.com/ziglang/zig/issues/22189
2025-10-18std.os.linux: fix some issues in mipsn32 inline asmAlex Rønne Petersen
ref https://github.com/ziglang/zig/issues/22189
2025-10-18std: make all MIPS inline asm safe for MIPS IAlex Rønne Petersen
MIPS I has load hazards so we need to insert nops in a few places. This is not a problem for MIPS II and later. While doing this, I also touched up all the inline asm to use ABI register aliases and a consistent formatting convention. Also fixed a few places that didn't properly check if the syscall return value should be negated.
2025-10-18os.linux.timeval: use same field names as std.cBrandon Black
Otherwise, the field names in std.posix.timeval vary by target os. I think this was an accidental change during the work of #25610
2025-10-17Merge pull request #25610 from alexrp/std-os-linux-cleanupAlex Rønne Petersen
`std.os.linux`: some miscellaneous cleanup in arch bits
2025-10-17windows: Always try using POSIX_SEMANTICS/etc for rename/deleteRyan Liptak
The compile-time check against the minimum version here wasn't appropriate, since it still makes sense to try using FILE_RENAME_INFORMATION_EX even if the minimum version is something like `xp`, since that doesn't rule out the possibility of the compiled code running on Windows 10/11. This compile-time check was doubly bad since the default minimum windows version (`.win10`) was below the `.win10_rs5` that was checked for, so when providing a target like `x86_64-windows-gnu` it'd always rule out using this syscall. After this commit, we always try using FILE_RENAME_INFORMATION_EX and then let the operating system tell us when some aspect of it is not supported. This allows us to get the benefits of these new syscalls/flags whenever it's actually possible. The possible error returns were validated experimentally: - INVALID_PARAMETER is returned when the underlying filesystem is FAT32 - INVALID_INFO_CLASS is returned on Windows 7 when trying to use FileRenameInformationEx/FileDispositionInformationEx - NOT_SUPPORTED is returned on Windows 10 >= .win10_rs5 when setting a bogus flag value (I used `0x1000`)
2025-10-17windows: make FILE_DISPOSITION_ constants pubRyan Liptak