| Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
* Truncate user and group ids
Calls to `getuid`, `getgid` and their `eid` variants fail to compile on
64bit Linux systems because the return value of the syscall is of
`usize` and needs to be truncated to fit the size of `uid_t` that is 32
bit.
Thanks to @FireFox317 for figuring this out in Zig's Discord channel!
* Add a regression test for user and group ids
* Replace @truncate with @intCast
This should be safe because `uid_t` will be 32-bit.
* Add missing import for getauxval
* Add missing package names
* Revert "Add missing import for getauxval"
This reverts commit 38f93dc89effdf657f2b81a56b96527ce4083f52.
* Skip user and group test if builtin.link_libc
|
|
Everybody gets what they want!
* AT_RANDOM is completely ignored.
* On Linux, MADV_WIPEONFORK is used to provide fork safety.
* On pthread systems, `pthread_atfork` is used to provide fork safety.
* For systems that do not have the capability to provide fork safety,
the implementation falls back to calling getrandom() every time.
* If madvise is unavailable or returns an error, or pthread_atfork
fails for whatever reason, it falls back to calling getrandom() every
time.
* Applications may choose to opt-out of fork safety.
* Applications may choose to opt-in to unconditionally calling
getrandom() for every call to std.crypto.random.fillFn.
* Added `std.meta.globalOption`.
* Added `std.os.madvise` and related bits.
* Bumped up the size of the main thread TLS buffer. See the comment
there for justification.
* Simpler hot path in TLS initialization.
|
|
ad05509 introduced a fix for the wrong problem, the logic to align the
start of main_thread_tls_buffer was already there but was flawed.
Fix it for good and avoid wasting too many bytes for alignment purposes.
|
|
Before this change, thread local variables were landmines if LLVM
decided to optimize any writes to them using vector instructions.
|
|
Add io_uring TIMEOUT and TIMEOUT_REMOVE operations:
|
|
|
|
|
|
ring.timeout() to queue a IORING_OP_TIMEOUT operation
ring.timeout_remove() to queue a IORING_OP_TIMEOUT_REMOVE operation
io_uring_prep_timeout() to prep a IORING_OP_TIMEOUT sqe
io_uring_prep_timeout_remove() to prep a IORING_OP_TIMEOUT_REMOVE sqe
|
|
|
|
|
|
|
|
fork() on Linux/sparc64 seems to return its result in two registers,
with %o0 always holding the current process' PID, and the parent/child
status returned in %o1. Add some glue code to convert those into
the libc-style return value.
|
|
Thanks @daurnimator for catching this.
|
|
This is the part of #3960 that has to be rewritten to apply to latest
master branch code.
|
|
Conflicts:
lib/std/dynamic_library.zig (fixed in this commit)
src/all_types.hpp
src/codegen.cpp
src/link.cpp
src/main.cpp
Will manually apply the diffs to these deleted files to the new zig
code in a followup commit.
|
|
Decouple kernel and libc stat definitions
|
|
linux: add fallocate()
|
|
There's no guarantee for the kernel definition to be ABI compatible with
the libc one (and vice versa).
There's also no guarantee of ABI compatibility between musl/glibc.
Fun, isn't it?
|
|
|
|
|
|
|
|
|
|
|
|
Initial sparc64-linux bringup
|
|
|
|
std: add io_uring library
|
|
|
|
|
|
Accidentally removed when rebasing, this adds it back.
|
|
|
|
|
|
|
|
|
|
|
|
Calling @panic made the executable ~30x times bigger, use a simple
`abort()` and let the user figure out what went wrong.
Supporting ARMv6 (and earlier?) platforms is not a priority.
Closes #6676
|
|
|
|
|
|
If an older kernel fails the `openat` test because of `AT_FDCWD`
then we don't want to skip the `close` test.
|
|
|
|
|
|
|
|
Removes non-essential .hardlink_with_next_sqe() and .drain_previous_sqes().
|
|
|
|
Decouples SQE queueing and SQE prepping methods to allow for non-sequential
SQE allocation schemes as suggested by @daurnimator.
Adds essential SQE prepping methods from liburing to reduce boilerplate.
Removes non-essential .link_with_next_sqe() and .use_registered_fd().
|
|
|
|
|
|
Ensures that the wakeup flag is read after the tail pointer has been
written. It's important to use memory load acquire semantics for the
flags read, otherwise the application and the kernel might not agree on
the consistency of the wakeup flag, leading to I/O starvation.
Refs: https://github.com/axboe/liburing/commit/6768ddcc562adb6ea141cf508bccecb6be8ce666
Refs: https://github.com/axboe/liburing/issues/219
|