Karl Böhlmark
9a56228c2b
doc: Fix typos in bpf docs
2024-01-03 12:34:10 +02:00
Andrew Kelley
96b4eeab55
std: disable failing test on macos
...
See tracking issue https://github.com/ziglang/zig/issues/18395
2024-01-01 19:49:08 -07:00
Veikka Tuominen
94c63f31f2
Merge pull request #18328 from ExpidusOS/feat/uefi-time
...
std: add support for getting the time in UEFI
2023-12-26 01:03:10 +02:00
Carl Åstholm
60982ea5bd
Correct CreateProcessW
parameter types
2023-12-22 12:23:27 +02:00
Tristan Ross
97fd100471
os.uefi: add ns to epoch
2023-12-20 20:05:16 -08:00
Tristan Ross
a86cd91389
os.uefi: add time to epoch conversion
2023-12-19 23:42:47 -08:00
Ryan Liptak
11a398af3e
File.stat: Support detection of Kind.sym_link on Windows
...
Requires an extra NtQueryInformationFile call when FILE_ATTRIBUTE_REPARSE_POINT is set to determine if it's actually a symlink or some other kind of reparse point (https://learn.microsoft.com/en-us/windows/win32/fileio/reparse-point-tags ). This is something that `File.Metadata.kind` was already doing, so the same technique is used in `stat`.
Also, replace the std.os.windows.DeviceIoControl call in `metadata` with NtQueryInformationFile (NtQueryInformationFile is what gets called during kernel32.GetFileInformationByHandleEx with FileAttributeTagInfo, verified using NtTrace).
2023-12-19 23:36:23 -08:00
loris
37458cc886
allow sqe entries up to 32768
2023-12-12 06:49:19 +02:00
xdBronch
7a46c20a79
switch to mem.span
...
Co-authored-by: erikarvstedt <36110478+erikarvstedt@users.noreply.github.com>
2023-12-08 15:58:08 +02:00
xdBronch
e9bd10cfda
add getName helper to inotify_event
2023-12-08 15:58:08 +02:00
David Rubin
1e42a3de89
Remove all usages of std.mem.copy
and remove std.mem.set
( #18143 )
2023-11-29 16:03:02 -05:00
Ryan Liptak
0bc4ee1792
Remove std.os.windows.ole32/shell32
2023-11-23 03:06:47 -08:00
Ryan Liptak
2c326d4390
std.os.windows: Add HKEY_CLASSES_ROOT
2023-11-23 01:11:53 -08:00
Andrew Kelley
6fc20b3b09
std.os.windows: remove volatile from inline asm
...
This inline assembly has no side effects.
2023-11-23 00:52:35 -05:00
Mikko Kaihlavirta
ea4a07701e
add missing timeval struct
2023-11-22 01:15:11 +02:00
expikr
40bd93e2a2
replace qpf and qpc
...
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update windows.zig
Update ntdll.zig
Update windows.zig
Update ntdll.zig
Update kernel32.zig
2023-11-21 14:10:25 +02:00
Tw
8ca4a5240e
linux/bpf: update helper definitions
...
Signed-off-by: Tw <tw19881113@gmail.com>
2023-11-19 19:01:18 +02:00
mlugg
51595d6b75
lib: correct unnecessary uses of 'var'
2023-11-19 09:55:07 +00:00
David
941090d94f
Move duplicate field detection for struct init expressions into AstGen
...
Partially addresses #17916 .
2023-11-16 14:38:16 +00:00
Bogdan Romanyuk
ee8da40769
replace deprecated std.math.absCast
2023-11-09 17:39:27 +02:00
Igor Anić
715e5f757f
fix io_uring tests on kernel 5.4
...
Unsupported tests are now skipped on kernel 5.4:
```
uname -a
Linux d20 5.4.0-166-generic #183-Ubuntu SMP Mon Oct 2 11:31:37 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
zig test lib/std/std.zig --zig-lib-dir lib --main-mod-path lib/std 2>&1 | cat
709/2616 test.nop... OK
710/2616 test.readv... OK
711/2616 test.writev/fsync/readv... OK
712/2616 test.write/read... SKIP
713/2616 test.splice/read... SKIP
714/2616 test.write_fixed/read_fixed... OK
715/2616 test.openat... SKIP
716/2616 test.close... SKIP
717/2616 test.accept/connect/send/recv... SKIP
718/2616 test.sendmsg/recvmsg... OK
719/2616 test.timeout (after a relative time)... SKIP
720/2616 test.timeout (after a number of completions)... OK
721/2616 test.timeout_remove... SKIP
722/2616 test.accept/connect/recv/link_timeout... SKIP
723/2616 test.fallocate... SKIP
724/2616 test.statx... SKIP
725/2616 test.accept/connect/recv/cancel... SKIP
726/2616 test.register_files_update... SKIP
727/2616 test.shutdown... SKIP
728/2616 test.renameat... SKIP
729/2616 test.unlinkat... SKIP
730/2616 test.mkdirat... SKIP
731/2616 test.symlinkat... SKIP
732/2616 test.linkat... SKIP
733/2616 test.provide_buffers: read... SKIP
734/2616 test.remove_buffers... SKIP
735/2616 test.provide_buffers: accept/connect/send/recv... SKIP
736/2616 test.accept multishot... SKIP
```
2023-11-08 18:52:03 +01:00
Igor Anić
7a1dbbd4f9
fix io_uring timeout_remove test on kernel 5.4
...
There is no grantee that `copy_cqes` will return exactly wait_nr number of cqes.
If there are ready cqes it can return > 0 but < wait_nr number of cqes.
2023-11-08 18:25:29 +01:00
Igor Anić
bec36aa7c0
io_uring: add multishot accept operation
...
Server networking application typically accept multiple connections. Multishot
accept simplifies handling these situations. Applications submits once and
receives CQE whenever a new connection request comes in.
Multishot is active until it is canceled or experience error. While active, and
further notification are expected CQE completion will have IORING_CQE_F_MORE set
in the flags. If this flag isn't set, the application must re-arm this request
by submitting a new one.
Reference: [io_uring and networking in 2023](https://github.com/axboe/liburing/wiki/io_uring-and-networking-in-2023#multi-shot )
2023-11-06 00:12:39 +02:00
Jacob Young
509be7cf1f
x86_64: fix std test failures
2023-11-03 23:18:21 -04:00
Ryan Liptak
ae6df9e967
start.zig: Replace kernel32 usage with ntdll
...
Co-authored-by: e4m2 <git@e4m2.com>
2023-11-03 19:25:46 +02:00
XXIV
c2cf47ab28
std.os.windows: remove unnecessary @ptrCast
( #17816 )
2023-11-01 18:45:51 -04:00
Kai Jellinghaus
7ee7c90274
Fix regressing #17290 from #17734
2023-11-01 18:30:56 +02:00
Andrew Kelley
3fc6fc6812
std.builtin.Endian: make the tags lower case
...
Let's take this breaking change opportunity to fix the style of this
enum.
2023-10-31 21:37:35 -04:00
Jacob Young
d890e81761
mem: fix ub in writeInt
...
Use inline to vastly simplify the exposed API. This allows a
comptime-known endian parameter to be propogated, making extra functions
for a specific endianness completely unnecessary.
2023-10-31 21:37:35 -04:00
Kamil T
37295696ec
std.os.windows additions and fixes
2023-10-29 11:01:54 +02:00
Andrew Kelley
e7ead9c5ea
std: delete psapi, gdi32, and winmm
...
The only remaining Windows APIs now are the ones that the standard
library itself depends on for its cross-platform abstractions.
closes #4426
2023-10-29 00:58:00 -04:00
Andrew Kelley
d817a3c517
delete std.os.windows.user32
...
This is progress towards #4426
Closes #17417
2023-10-28 13:16:47 -04:00
Jacob Young
3b0dce8ebd
Merge pull request #17716 from jacobly0/x86_64
...
x86_64: pass more tests
2023-10-27 08:29:24 -04:00
Jacob Young
98cd378208
x86_64: fix behavior of getValue
...
Old behavior renamed to `getValueIfFree`.
2023-10-26 21:45:58 -04:00
Jacob Young
5e83441096
x86_64: implement @divFloor
and @mod
for i128
2023-10-26 21:45:57 -04:00
joadnacer
28b848e3f0
std.io_uring: Improve splice implementation
2023-10-27 00:31:55 +01:00
joadnacer
0005e7e70b
std.linux: Update io_uring structs and consts for kernel 6.3.8
2023-10-27 00:31:52 +01:00
Jacob Young
b55377a5ab
x86_64: pass more tests
...
* 128-bit integer multiplication with overflow
* more instruction encodings used by std inline asm
* implement the `try_ptr` air instruction
* follow correct stack frame abi
* enable full panic handler
* enable stack traces
2023-10-25 04:28:30 -04:00
Jacob Young
8f69e977f1
x86_64: implement 128-bit builtins
...
* `@clz`
* `@ctz`
* `@popCount`
* `@byteSwap`
* `@bitReverse`
* various encodings used by std
2023-10-23 22:42:18 -04:00
Jacob Young
27fe945a00
Revert "Revert "Merge pull request #17637 from jacobly0/x86_64-test-std""
...
This reverts commit 6f0198cadb
.
2023-10-22 15:46:43 -04:00
Andrew Kelley
6f0198cadb
Revert "Merge pull request #17637 from jacobly0/x86_64-test-std"
...
This reverts commit 0c99ba1eab
, reversing
changes made to 5f92b070bf
.
This caused a CI failure when it landed in master branch due to a
128-bit `@byteSwap` in std.mem.
2023-10-22 12:16:35 -07:00
Jacob Young
32e85d44eb
x86_64: disable failing tests, enable test-std testing
2023-10-21 10:55:41 -04:00
Jacob Young
2e6e39a700
x86_64: fix bugs and disable erroring tests
2023-10-21 10:55:41 -04:00
joadnacer
89aad1b89c
linux.io_uring: Implement splice functions
2023-10-21 05:02:17 +03:00
Prokop Randacek
fee09009a8
gettimeofday takes nullable pointers
2023-10-20 00:15:34 -04:00
Ben Crist
6d47198303
return error.AlreadyTerminated from std.ChildProcess.kill when necessary
2023-10-17 16:56:15 -07:00
kcbanner
68ed787751
windows: fix ReadLink not using a synchronous file handle
2023-10-17 14:33:55 -04:00
Andrew Kelley
877393d17a
std.fs: fix relative symbolic links on Windows
...
closes #17564
2023-10-17 06:27:07 -04:00
Ratakor
8ce33795e9
Add pause() to linux.zig
2023-10-06 11:49:31 -07:00
Ratakor
cef90eab57
Add filled_sigset to os.linux
...
filled_sigset is equivalent to sigfillset() as empty_sigset is
equivalent to sigemptyset().
2023-10-06 11:49:31 -07:00