aboutsummaryrefslogtreecommitdiff
path: root/lib/std
AgeCommit message (Collapse)Author
2021-01-19SPIR-V: Add glsl450 and vulkan spir-v operating system definitionsRobin Voetter
2021-01-19SPIR-V: Initial architecture definitions and setupRobin Voetter
2021-01-18Merge pull request #7814 from LemonBoy/fix-7760Andrew Kelley
std: Fixed pipe2 fallback
2021-01-18update error return docJulian Maingot
Docs were out of sync with code
2021-01-18std: Add missing cast when calling fcntl w/ constant argsLemonBoy
comptime_int arguments are a big no no.
2021-01-18std: define pipe2 only for os that support itLemonBoy
2021-01-18std: Fixed pipe2 fallbackLemonBoy
Use both F_SETFD and F_SETFL depending on what flag we're setting. Closes #7760
2021-01-16std.ArrayHashMap: add "AssertDiscard" function variantsAndrew Kelley
* Add `swapRemoveAssertDiscard` * Add `orderedRemoveAssertDiscard` * Deprecate `removeAssertDiscard`
2021-01-16Merge pull request #7716 from koachan/sparc64-libsAndrew Kelley
stage1: SPARCv9 f128 enablement
2021-01-15crypto: add legacy keccak hash functionsGuillaume Ballet
2021-01-15Fix _Qp_cmp definitionKoakuma
2021-01-15Add compiler-rt stub for SPARC CPUsKoakuma
2021-01-14std.Thread: avoid compile errors for single-threaded OS'sAndrew Kelley
2021-01-14fix namespace of kernel32 function callsAndrew Kelley
2021-01-14std.Thread.StaticResetEvent: call spinLoopHint appropriatelyAndrew Kelley
2021-01-14std.Thread.Mutex: restore the "Held" APIAndrew Kelley
so that std.Thread.Mutex.Dummy can be used as a drop in replacement.
2021-01-14organize std lib concurrency primitives and add RwLockAndrew Kelley
* move concurrency primitives that always operate on kernel threads to the std.Thread namespace * remove std.SpinLock. Nobody should use this in a non-freestanding environment; the other primitives are always preferable. In freestanding, it will be necessary to put custom spin logic in there, so there are no use cases for a std lib version. * move some std lib files to the top level fields convention * add std.Thread.spinLoopHint * add std.Thread.Condition * add std.Thread.Semaphore * new implementation of std.Thread.Mutex for Windows and non-pthreads Linux * add std.Thread.RwLock Implementations provided by @kprotty
2021-01-13std.os.uefi.protocols.FileProtocol: fix and expose get_position, ↵Asherah Connor
set_position (#7762)
2021-01-12Move fmt.testFmt to testing.expectFmtJay Petacat
2021-01-12add missing ECONNRESET from getsockoptErrorBill Nagel
2021-01-12Merge pull request #7577 from semarie/emutlsAndrew Kelley
implement emutls inside compiler_rt.zig
2021-01-12Merge pull request #7714 from mikdusan/target-macosAndrew Kelley
macos: reimplement OS version detection
2021-01-12define nfds_t for windowsBill Nagel
2021-01-12implement emutls in compiler_rtSébastien Marie
2021-01-12add pthread_key functionsSébastien Marie
2021-01-11std.event.Loop: fix race condition when starting the time wheelAndrew Kelley
closes #7572
2021-01-11stage2: cleanups regarding red zone CLI flagsAndrew Kelley
* CLI: change to -mred-zone and -mno-red-zone to match gcc/clang. * build.zig: remove the double negative and make it an optional bool. This follows precedent from other flags, allowing the compiler CLI to be the decider of what is default instead of duplicating the default value into the build system code. * Compilation: make it an optional `want_red_zone` instead of a `no_red_zone` bool. The default is decided by a call to `target_util.hasRedZone`. * When creating a Clang command line, put -mred-zone on the command line if we are forcing it to be enabled. * Update update_clang_options.zig with respect to the recent {s}/{} format changes. * `zig cc` integration with red zone preference.
2021-01-11Added support for no red zoneLee Cannon
2021-01-11more fixupsMichael Dusan
- clarify comments - `NativeTargetInfo.detect()` propagate macOS errors - `macos.detect()` drop `std.log` usage
2021-01-11macos: reimplement OS version detectionMichael Dusan
The macOS version is now obtained by parsing `SystemVersion.plist`. Test cases added for plist files that date back to '2005 Panther and up to the recent '2020 Big Sur 11.1 release of macOS. Thus we are now able to reliably identify 10.3...11.1 and higher. - drop use of kern.osproductversion sysctl - drop use of kern.osversion sysctl (fallback) - drop kern.osversion tests - add `lib.std.zig.system.detect()` - add minimalistic parser for `SystemVersion.plist` - add test cases for { 10.3, 10.3.9, 10.15.6, 11.0, 11.1 } closes #7569
2021-01-11std.os.windows.GetFinalPathNameByHandle: remove intermediate buffersRohlem
... and mem.copy operations. Requires slightly larger input buffers than result length. Add helper functions std.mem.alignInBytes and std.mem.alignInSlice.
2021-01-11std.os.windows.GetFinalPathNameByHandle: remove QueryInformationFile code pathRohlem
2021-01-11std.os.windows.GetFinalPathNameByHandle: address non-structural review commentsRohlem
2021-01-11std.os.windows.GetFinalPathNameByHandle: replace kernel32 by ntdll callRohlem
Removes the call to kernel32.GetFinalPathNameByHandleW in favor of NtQueryObject, which means we can reuse the other codepath's logic for DOS naming.
2021-01-11introduce std.os.windows.QueryObjectNameRohlem
2021-01-11std.os.windows.GetFinalPathNameByHandle: add testRohlem
2021-01-11std.os.windows.GetFinalPathNameByHandle: reintroduce kernel32 for compatibilityRohlem
The NtQueryInformationFile with .FileNormalizedNameInformation is only available in Windows 10 1803 (rs4) and later, however there is probably still another route we can go via ntdll.
2021-01-11add std.zig.system.windows version check utility functionsRohlem
2021-01-11move windows runtime version detection into std.zig.system.windowsRohlem
2021-01-11Add std.fmt.formatDuration and std.fmt.duration (#7297)Jonathan Knezek
`formatDuration` works on a writer, and `duration` wraps a u64 to allow pleasant injection into format strings.
2021-01-11Merge pull request #7195 from Aransentin/masterAndrew Kelley
A win32-api proposal, implemented for user32.zig
2021-01-11std.EarlyEOFReader: rename to LimitedReaderAndrew Kelley
2021-01-11std: use fifo.pump in writeFileAllUnseekabledaurnimator
2021-01-11std: add LimitedReader: reader that returns EOF earlydaurnimator
2021-01-11std: use reader.skipBytes to avoid infinite loop in writeFileAllUnseekabledaurnimator
skipBytes correctly handles EOF for us
2021-01-11std: reader.skipBytes's num_bytes should be a u64daurnimator
2021-01-11os/bits/linux: add the termios cc bitsVincent Rischmann
2021-01-11Merge pull request #7124 from LemonBoy/netstuff1Andrew Kelley
std: Decouple network streams from fs.File
2021-01-11std CityHash: disable memory-expensive tests for nowAndrew Kelley
2021-01-11Modify cityhash to work at comptimeMartin Wickham