Jacob Young
c8950b5dd5
EventLoop: fix std.Io.Condition implementation
...
1. a fiber can't put itself on a queue that allows it to be rescheduled
2. allow the idle fiber to unlock a mutex held by another fiber by
ignoring reschedule requests originating from the idle fiber
2025-10-02 16:30:59 -07:00
Jacob Young
5952fc2c73
EventLoop: revert incorrect optimization
2025-10-02 16:30:59 -07:00
Andrew Kelley
34e85db4a2
EventLoop: remove broken mechanism for making deinit block on detached
2025-10-02 16:30:59 -07:00
Andrew Kelley
e5b2df0c9b
std.Io.Condition: change primitive to support only one
...
and no timer
2025-10-02 16:30:59 -07:00
Andrew Kelley
63b3a3d11c
EventLoop: take DetachedClosure into account when allocating
2025-10-02 16:30:59 -07:00
Andrew Kelley
663611773c
EventLoop: implement detached async
...
data races on deinit tho
2025-10-02 16:30:59 -07:00
Jacob Young
0f083f24ff
Io: implement faster mutex
2025-10-02 16:30:59 -07:00
Andrew Kelley
0086d315f5
std.Io: add detached async
2025-10-02 16:30:59 -07:00
Andrew Kelley
5508b4c887
implement Mutex, Condition, and Queue
2025-10-02 16:30:59 -07:00
Jacob Young
b01244d225
Io: implement sleep and fix cancel bugs
2025-10-02 16:30:59 -07:00
Jacob Young
b37126bc08
EventLoop: implement thread-local queues and cancellation
2025-10-02 16:30:59 -07:00
Andrew Kelley
c278830592
std.Io: introduce cancellation
2025-10-02 16:30:59 -07:00
Andrew Kelley
79e278f6a2
better API for Io.async
2025-10-02 16:30:59 -07:00
Jacob Young
708bac1a57
EventLoop: fix futex usage
...
How silly of me to forget that the kernel doesn't implement its own API.
The scheduling is not great, but at least doesn't deadlock or hammer.
2025-10-02 16:30:59 -07:00
Jacob Young
507f973b5e
EventLoop: get file operations working
...
Something is horribly wrong with scheduling, as can be seen in the
debug output, but at least it somehow manages to exit cleanly...
2025-10-02 16:30:59 -07:00
Andrew Kelley
b215ddc9fb
WIP
2025-10-02 16:30:59 -07:00
Andrew Kelley
be68b28b9b
start adding fs functions to std.Io
2025-10-02 16:30:59 -07:00
Andrew Kelley
5be0d0b48c
free freeing wrong amount in thread pool impl
2025-10-02 16:30:59 -07:00
Jacob Young
2f2019645c
EventLoop: move context after the async closure
...
This avoids needing to store more sizes and alignments. Only the result
alignment needs to be stored, because `Fiber` is at a fixed zero offset.
2025-10-02 16:30:59 -07:00
Jacob Young
dfbf68e5fa
EventLoop: fix incorrect alignment panic
...
When the previous fiber did not request to be registered as an awaiter,
it may not have actually been a full blown `Fiber`, so only create the
`Fiber` pointer when needed.
2025-10-02 16:30:59 -07:00
Andrew Kelley
3ee2399630
update threaded fibers impl to actually storing args
...
sorry, something still not working correctly
2025-10-02 16:30:59 -07:00
Andrew Kelley
acd02e978b
fix context passing in threaded Io impl
2025-10-02 16:30:59 -07:00
Jacob Young
1e79f2c12f
EventLoop: implement main idle fiber
2025-10-02 16:30:59 -07:00
Jacob Young
2c1ceb4c9c
EventLoop: add threads
2025-10-02 16:30:59 -07:00
Jacob Young
19e7613a2d
EventLoop: rewrite context switching
2025-10-02 16:30:59 -07:00
Jacob Young
a9723598d7
EventLoop: prepare for threading
2025-10-02 16:30:59 -07:00
Andrew Kelley
1e09d7f499
demo: single-threaded green threads implementation
2025-10-02 16:30:59 -07:00
Andrew Kelley
cfb3581fb9
make thread pool satisfy async/await interface
2025-10-02 16:30:59 -07:00
Andrew Kelley
63c554d5a7
introduce std.Io interface
...
which is planned to have all I/O operations in the interface, but for
now has only async and await.
2025-10-02 16:30:59 -07:00
Alex Rønne Petersen
bc4da9a907
Merge pull request #25437 from alexrp/std-debug
...
`std.debug`: LoongArch and RISC-V unwind support + some minor cleanups
2025-10-02 21:38:07 +02:00
Alex Rønne Petersen
a4f95b1e61
std.debug.Dwarf.Unwind: deal with invalid def_cfa_reg by GNU toolchains
2025-10-02 15:27:35 +02:00
Alex Rønne Petersen
14019a95a4
ci: bump x86_64-linux-release timeout to 7 hours on Forgejo Actions
2025-10-02 13:27:00 +02:00
mlugg
1914d1a6e5
Lld: fix implib emit path
...
Resolves: https://github.com/ziglang/zig/issues/24993
2025-10-02 02:31:44 +01:00
Alex Rønne Petersen
97de46dc16
std.debug: add riscv32-linux and riscv64-linux unwind support
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
8520e9312e
std.debug: add loongarch64-linux unwind support
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
b46867848e
std.debug: some adjustments to target handling
...
* driverkit handling missing in a few places.
* x86-solaris is a dead target.
* aarch64_be does not exist on Darwin, FreeBSD, Windows.
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
771410cbf2
std.debug.SelfInfo: rename Darwin to MachO
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
e1fb662f60
std.debug: don't use SelfInfo.Windows for UEFI
...
It is, in fact, Windows-only.
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
59633e54a2
std.debug: select SelfInfo using ObjectFormat.default()
2025-10-01 23:47:47 +02:00
Alex Rønne Petersen
2cdafe9106
ci: allow riscv64-linux on Forgejo Actions to run on PRs for now
...
Since it's not currently running on pushes to master, there's plenty of capacity
to run it on PRs on the Codeberg side.
2025-10-01 23:45:40 +02:00
Andrew Kelley
4bb9aa91eb
these documents belong elsewhere
...
contributing is in the readme already, and code of conduct should go on
the website. this is a code repository; it doesn't dictate social norms.
the reason for these documents being in .github/ was to satisfy GitHub
demands so that the UI would look more favorably upon ziglang/zig but
that is no longer a concern.
2025-10-01 14:08:38 -07:00
Ryan Liptak
c50aa2b95c
resinator: Sync with upstream, fix an alignment problem
2025-10-01 07:48:33 -07:00
Alex Rønne Petersen
fc59870e3b
move .github/FUNDING.yml to https://github.com/ziglang/.github
2025-10-01 13:48:09 +02:00
Alex Rønne Petersen
d57f1b1572
ci: run riscv64-linux on any non-PR Forgejo Actions event, including workflow_dispatch
2025-10-01 13:36:18 +02:00
Alex Rønne Petersen
bd9098e285
ci: bump x86_64-linux-debug-llvm timeout to 8 hours on Forgejo Actions
2025-10-01 13:17:31 +02:00
Alex Rønne Petersen
30e43f7246
move some docs out of .github/
2025-10-01 13:08:03 +02:00
Alex Rønne Petersen
691be2f19f
ci: add Forgejo Actions workflow file
2025-10-01 13:00:22 +02:00
Alex Rønne Petersen
2aa9dd44a5
ci: we don't require s3cmd anymore
2025-10-01 13:00:22 +02:00
Alex Rønne Petersen
781cc731ed
ci: move Git repository unshallowing to the workflow
2025-10-01 13:00:22 +02:00
Alex Rønne Petersen
acf8d5234f
ci: stop requiring an ARCH environment variable to be set
2025-10-01 13:00:22 +02:00