aboutsummaryrefslogtreecommitdiff
path: root/lib/std/os
AgeCommit message (Collapse)Author
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-05-07fix test to restore cwd after chdirMichael Dusan
- `../zig-cache/tmp` is no longer created by subsequent test(s)
2021-05-06Merge pull request #8683 from LemonBoy/thumblinuxAndrew Kelley
Initial bringup for Linux/Thumb2
2021-05-05Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * build.zig * lib/std/array_list.zig * lib/std/c/ast.zig * lib/std/c/parse.zig * lib/std/os/bits/linux.zig
2021-05-04std: Initial bringup for Linux on Thumb2LemonBoy
There are some small problems here and there, mostly due to the pointers having the lsb set and disrupting the fn alignment tests and the `@FrameSize` implementation.
2021-05-03std/os/bits/windows: add `timeval` extern structlithdew
2021-05-03std/os/linux/bits: correct socket option codes for ppc/ppc64lithdew
2021-05-03std/os/bits: add timeval struct for riscv64 linuxlithdew
2021-05-03x/os, x/net: re-approach `Address`, rename namespace `TCP -> tcp`lithdew
Address comments from @ifreund and @MasterQ32 to address unsafeness and ergonomics of the `Address` API. Rename the `TCP` namespace to `tcp` as it does not contain any top-level fields. Fix missing reference to `sockaddr` which was identified by @kprotty in os/bits/linux/arm64.zig.
2021-05-03x/os, x/net: layout tcp, ipv4/ipv6, and socket abstractionslithdew
The `Socket` abstraction was refactored to only comprise of methods that can be generically used/applied to all socket domains and protocols. A more comprehensive IPv4/IPv6 module derived from @LemonBoy's earlier work was implemented under `std.x.os.IPv4` and `std.x.os.IPv6`. Using this module, one can then combine them together into a union for example in order to optimize memory usage when dealing with socket addresses. A `TCP.Client` and `TCP.Listener` abstraction is introduced that is one layer over the `Socket` abstraction, which isolates methods that can only be applied to a "client socket" and a "listening socket". All prior tests from the `Socket` abstraction, which all previously operated assuming the socket is operating via. TCP/IP, were moved. All TCP socket options were also moved into the `TCP.Client` and `TCP.Listener` abstractions respectively away from the `Socket` abstraction. Some additional socket options from @LemonBoy's prior PR for Darwin were also moved in (i.e. SIGNOPIPE).
2021-05-01fix typoAndrew Kelley
Co-authored-by: Maciej Walczak <14938807+xackus@users.noreply.github.com>
2021-05-01std: Fix pwrite/pread syscalls on SPARC targetsLemonBoy
2021-05-01std: Add signal numbers for SPARCLemonBoy
2021-05-01std: Import correct errno defs for SPARCLemonBoy
Taken from Linux arch/sparc/include/uapi/asm/errno.h
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
2021-04-28Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
In particular I wanted to take advantage of the new hex float parsing code.
2021-04-26Merge pull request #8604 from hoanga/haiku-support-sysdefsAndrew Kelley
further haiku support system definitions
2021-04-26Merge pull request #8618 from LemonBoy/mini-stuffAndrew Kelley
Two small patches
2021-04-25std: Fix wrong alignOf expressionLemonBoy
Mostly harmless but conceptually wrong, luckily it hasn't tripped any safety check.
2021-04-25x: fmt source codelithdew
2021-04-24Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
In particular I wanted the change that makes `suspend;` illegal in the parser.
2021-04-24fix import pathMatt Knight
2021-04-23update haiku system constantsAl Hoang
2021-04-22std: fix compile errors caught by stage2 AstGenAndrew Kelley
Follow-up from 507a8096d2f9624bafaf963c3e189a477ef6b7bf
2021-04-22delete packed enums from the languageAndrew Kelley
No need for any such thing. Instead, provide an integer tag type for the enum.
2021-04-22std: fix compile errors caught by stage2 AstGenAndrew Kelley
* `comptime const` is redundant * don't use `extern enum`; specify a tag type. `extern enum` is only when you need tags to alias. But aliasing tags is a smell. I will be making a proposal shortly to remove `extern enum` from the language. * there is no such thing as `packed enum`. * instead of `catch |_|`, omit the capture entirely. * unused function definition with missing parameter name * using `try` outside of a function or test
2021-04-21std: Use stat definition with 32bit *time fieldsLemonBoy
We're not ready for Y38K yet.
2021-04-21std: Split syscall parameters for PowerPC targetsLemonBoy
2021-04-19std: Add process_vm_readv/writev wrappersHubert Jasudowicz
2021-04-17std: Add pidfd wrappersHubert Jasudowicz
2021-04-16Fix std.os.windows.user32.messageBoxWManuel Floruß
Arguments to `selectSymbol` were passed in the wrong order.
2021-04-16linux: fix number of arguments for tgkill syscallMahdi Khanalizadeh
2021-04-15std: change `@import("builtin")` to `std.builtin`Andrew Kelley
2021-04-15freebsd: disable failing testAndrew Kelley
See #8538
2021-04-11Merge pull request #8497 from LemonBoy/some-ppc-fixesAndrew Kelley
Improve Improve PowerPC support
2021-04-11std: Fix TLS definitions for 32bit PowerPC targetsLemonBoy
Correct some silly errors and add the missing piece to set the thread pointer (r2).
2021-04-10Rename time32 syscalls to match rest of stdlibBenjamin Feng
2021-04-10Add ppc Linux bitsBenjamin Feng
2021-04-07netbsd: minor fixes to allow stage1 to buildMichael Dusan
2021-04-07test: fix std.time timing tests to skip on failureMichael Dusan
2021-04-04os/bits/linux: add IPv6 socket optionsVincent Rischmann
2021-04-02test: fix io_uring timing test to skip on failureMichael Dusan
2021-03-25boot_services: implement locateDevicePathSreehari S
2021-03-22Fixed typo in user32Carlos Zúñiga
Use CreateWindowExW instead of RegisterClassExW as the type of pfnCreateWindowExW.
2021-03-19std: Add syscall7 stub for Linux/MIPSLemonBoy
Some syscalls such as fadvise require an extra argument to comply with the register pair alignment imposed by the ABI. Wacky, isn't it?
2021-03-14std: Replace testing fns for floating-point valuesLemonBoy
Beside handling NaNs and other non-numeric values better we finally offer the same pair of testing predicates in math and testing.
2021-03-12std/linux: sync io_uring library with liburingIsaac Freund
liburing commit: https://github.com/axboe/liburing/commit/1bafb3ce5f5eeb11cd982c7540f6aa74e3f381d4 As stated in the liburing commit message, this fixes a regression, reverting code that was added specutively to avoid a syscall in some cases.
2021-03-02os/linux: fix IO_Uring.timeoutVincent Rischmann
According to the io_uring PDF (https://kernel.dk/io_uring.pdf) the timeout struct must be 64 bits on both 32 and 64 bit architectures.
2021-03-01zig fmt the std libAndrew Kelley
2021-02-28Merge pull request #8097 from LemonBoy/thread-spawn-orderAndrew Kelley
std: Swap arguments in Thread.spawn