lithdew
96fe49ef62
std/os/bits/windows: add timeval extern struct
2021-05-03 14:49:10 +09:00
lithdew
16fc1b904c
std/os/linux/bits: correct socket option codes for ppc/ppc64
2021-05-03 14:49:10 +09:00
lithdew
cc6714a929
std/os/bits: add timeval struct for riscv64 linux
2021-05-03 14:49:10 +09:00
lithdew
13068da43e
x/os, x/net: re-approach Address, rename namespace TCP -> tcp
...
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-03 14:49:10 +09:00
lithdew
2ab588049e
x/os, x/net: layout tcp, ipv4/ipv6, and socket abstractions
...
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-03 14:49:10 +09:00
Andrew Kelley
d788181a3b
fix typo
...
Co-authored-by: Maciej Walczak <14938807+xackus@users.noreply.github.com>
2021-05-01 18:07:26 -04:00
LemonBoy
718b43504e
std: Fix pwrite/pread syscalls on SPARC targets
2021-05-01 15:46:28 +02:00
LemonBoy
69a9c1488d
std: Add signal numbers for SPARC
2021-05-01 12:25:40 +02:00
LemonBoy
527053a4e4
std: Import correct errno defs for SPARC
...
Taken from Linux arch/sparc/include/uapi/asm/errno.h
2021-05-01 11:03:59 +02:00
Andrew Kelley
95b42f9e6b
Merge pull request #8604 from hoanga/haiku-support-sysdefs
...
further haiku support system definitions
2021-04-26 16:12:23 -04:00
Andrew Kelley
528a83dd6b
Merge pull request #8618 from LemonBoy/mini-stuff
...
Two small patches
2021-04-26 14:32:45 -04:00
LemonBoy
dc29d86649
std: Fix wrong alignOf expression
...
Mostly harmless but conceptually wrong, luckily it hasn't tripped any
safety check.
2021-04-25 19:12:49 +02:00
lithdew
98706c9686
x: fmt source code
2021-04-25 21:15:02 +09:00
Matt Knight
8530b6b724
fix import path
2021-04-24 13:35:55 -04:00
Al Hoang
762d4a959c
update haiku system constants
2021-04-23 23:40:42 -05:00
LemonBoy
e4f9a3041a
std: Use stat definition with 32bit *time fields
...
We're not ready for Y38K yet.
2021-04-21 16:31:30 +02:00
LemonBoy
d82eb8dd40
std: Split syscall parameters for PowerPC targets
2021-04-21 16:31:29 +02:00
Hubert Jasudowicz
d605f02756
std: Add process_vm_readv/writev wrappers
2021-04-19 16:12:28 +02:00
Hubert Jasudowicz
5134fb72ef
std: Add pidfd wrappers
2021-04-17 01:13:16 +02:00
Manuel Floruß
2cd49d20e8
Fix std.os.windows.user32.messageBoxW
...
Arguments to `selectSymbol` were passed in the wrong order.
2021-04-16 13:01:25 -04:00
Mahdi Khanalizadeh
d1a41feddc
linux: fix number of arguments for tgkill syscall
2021-04-16 17:09:15 +02:00
Andrew Kelley
04b8354702
freebsd: disable failing test
...
See #8538
2021-04-15 00:59:40 -07:00
Andrew Kelley
c5e662d860
Merge pull request #8497 from LemonBoy/some-ppc-fixes
...
Improve Improve PowerPC support
2021-04-11 18:59:31 -07:00
LemonBoy
9bebdc77d6
std: Fix TLS definitions for 32bit PowerPC targets
...
Correct some silly errors and add the missing piece to set the thread
pointer (r2).
2021-04-11 21:26:22 +02:00
Benjamin Feng
2e85eb2bf8
Rename time32 syscalls to match rest of stdlib
2021-04-10 22:47:22 -05:00
Benjamin Feng
df910b33f4
Add ppc Linux bits
2021-04-10 22:47:22 -05:00
Michael Dusan
341dc03b63
netbsd: minor fixes to allow stage1 to build
2021-04-07 16:26:21 -07:00
Michael Dusan
2871d32be7
test: fix std.time timing tests to skip on failure
2021-04-07 08:33:32 -04:00
Vincent Rischmann
5ce4524027
os/bits/linux: add IPv6 socket options
2021-04-04 20:43:41 +03:00
Michael Dusan
cc435dab2f
test: fix io_uring timing test to skip on failure
2021-04-02 07:12:09 -04:00
Sreehari S
5c28b8cd11
boot_services: implement locateDevicePath
2021-03-25 16:45:43 +02:00
Carlos Zúñiga
187af14599
Fixed typo in user32
...
Use CreateWindowExW instead of RegisterClassExW as the type of pfnCreateWindowExW.
2021-03-22 10:43:04 +02:00
LemonBoy
867ae506e3
std: Add syscall7 stub for Linux/MIPS
...
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-19 13:03:55 -07:00
LemonBoy
27d07c6c4d
std: Replace testing fns for floating-point values
...
Beside handling NaNs and other non-numeric values better we finally
offer the same pair of testing predicates in math and testing.
2021-03-14 17:23:47 -04:00
Isaac Freund
b83ef595a5
std/linux: sync io_uring library with liburing
...
liburing commit: 1bafb3ce5f
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-12 22:22:06 +01:00
Vincent Rischmann
3dd8396a55
os/linux: fix IO_Uring.timeout
...
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-02 14:13:11 +02:00
Andrew Kelley
a20169a610
zig fmt the std lib
2021-03-01 20:04:28 -07:00
Andrew Kelley
9550db33cb
Merge pull request #8097 from LemonBoy/thread-spawn-order
...
std: Swap arguments in Thread.spawn
2021-02-28 20:42:34 -08:00
daurnimator
1f17221bc4
std: add sendmsg
2021-02-28 21:57:43 +02:00
LemonBoy
566adc2510
std: Swap arguments in Thread.spawn
...
Beside the new order being consistent with the ThreadPool API and making
more sense, this shuffling allows to write the context argument type in
terms of the startFn arguments, reducing the use of anytype (eg. less
explicit casts when using comptime_int parameters, yay).
Sorry for the breakage.
Closes #8082
2021-02-28 14:03:19 +01:00
Al Hoang
c17396691c
initial support for haiku sync update
...
* add cpu count
* use haiku find_directory
* add definitions and exports for building in haiku
2021-02-25 16:41:42 -07:00
Al Hoang
6b0372229d
initial support for haiku continue clean up
...
* remove unused definitions
* setup os specific blocks
2021-02-25 16:41:42 -07:00
Al Hoang
025635c3f8
initial support for haiku past stage0
2021-02-25 16:41:42 -07:00
Andrew Kelley
5f35dc0c0d
zig fmt the std lib
2021-02-24 21:29:23 -07:00
Asherah Connor
4272f07f66
std.os.uefi.Guid fixes ( #8032 )
...
* uefi: Guid.format compiles again
Also use "writer" nomenclature in argument name.
* uefi: add Guid.eql
2021-02-21 12:17:59 +02:00
Tau
840331ee48
Rebase link(at) properly
2021-02-21 12:04:40 +02:00
data-man
340825a7af
Add epoll_pwait2 Linux syscall
2021-02-21 11:47:13 +02:00
Tadeo Kondrak
5dfe0e7e8f
Convert inline fn to callconv(.Inline) everywhere
2021-02-10 20:06:12 -07:00
Andrew Kelley
4ca1f4ec2e
Merge pull request #7846 from LemonBoy/filtertest
...
stage1: don't filter test blocks with empty label
2021-01-25 10:39:11 -08:00
Joran Dirk Greef
68a040aec7
linux: add fallocate() to io_uring
2021-01-25 10:34:20 -08:00