-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
std: add io_uring library #6356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
b340bbf
std: add io_uring library
jorangreef 6f09796
Add short license and copyright notice
jorangreef 491a434
Check kernel support for single_mmap, accept, and read/write
jorangreef ac1d9f7
Use != 0 for bitwise flag conditions
jorangreef 21c8136
Remove comment
jorangreef d966fe6
Add IORING_SQ_CQ_OVERFLOW to std/os/bits/linux.zig
jorangreef e33c466
Use std.builtin
jorangreef 8b030a6
Use x.y for C-style x->y instead of x.*.y
jorangreef ee59319
@ptrCast fds.ptr to *const c_void for io_uring_register()
jorangreef 5df0d28
Do not register /dev/zero as an fd when testing queue_readv()
jorangreef b2a54b9
Test IORING_REGISTER_FILES but avoid sparse fd sets
jorangreef 09f2f4a
Fix std @import
jorangreef 873d1c8
Add splice_fd_in to io_uring_sqe and future-proof for anonymous unions
jorangreef 31533eb
Move to std/os/linux
jorangreef cb59128
Use linux.IORING_SQ_CQ_OVERFLOW
jorangreef 0d8c6a9
Remove dangling @import from std
jorangreef 9fabae2
Return error.UnsupportedKernel for ENOSYS
jorangreef c1f9d10
Remove unused import aliases
jorangreef 64ae9a6
Rename to error.SubmissionQueueFull
jorangreef f4df2f0
Allow the kernel to drive feature detection
jorangreef e7ae6f2
Remove default values from io_uring_sqe struct
jorangreef ba18420
Zero the SQE slot and assign, instead of initializing with default va…
jorangreef 92407bf
Upgrade check_errno() to an exhaustive switch (safer)
jorangreef 4bc1b7a
Fix io_uring_sqe to use the names of the first member of each union
jorangreef abebacd
Handle all possible syscall errors and bring errors in line with os.zig
jorangreef b672dc7
Use os.fd_t instead of i32 and assert against c_int for syscall safety
jorangreef f22eea8
Fix opcode support detection for read/write test
jorangreef 40293a0
Add safety checks
jorangreef e51728a
Make enter(), flush_sq(), sq_ring_needs_enter(), cq_ring_needs_flush(…
jorangreef 77903f8
Test structs and offsets
jorangreef a853f00
Add IORING_FEAT_FAST_POLL
jorangreef 843c104
Add io_uring syscalls to os.bits.linux.mips.SYS
jorangreef 575ed94
Cache mask instead of dereferencing mask pointer
jorangreef 57603fd
Use @intCast instead of @truncate on io_uring_enter() result
jorangreef 7719abb
Add flags to queue_fsync() signature as per liburing
jorangreef 2d8df2b
Use @intCast instead of @truncate
jorangreef 5f99d2c
Define SPLICE, PROVIDE_BUFFERS, REMOVE_BUFFERS and TEE opcodes and flags
jorangreef 95def89
Handle EBADFD (ring fd in bad state) in enter()
jorangreef a9b1070
Use load acquire semantics when reading the SQPOLL wakeup flag
jorangreef c5b4fca
Add IORING_FEAT_POLL_32BITS
jorangreef 61ec6cb
Expose available kernel features
jorangreef e32c7d0
Limit entries to u12, add errors for invalid entries, use mem.zeroInit
jorangreef 69a55fc
Allow for advanced non-sequential SQE allocation schemes
jorangreef 3d2de6c
Use load relaxed semantics when reading the SQPOLL wakeup flag
jorangreef 6a53f4b
Add openat(), close(), connect(), send(), recv(), as well as tests
jorangreef 9091fcb
Improve openat/accept test debugging
jorangreef 72bdfa5
Skip openat test only for older kernels that do not fully support AT_…
jorangreef 958ff08
Use const wherever possible
jorangreef 9be2941
Split openat/close test into two separate tests
jorangreef e9ba12f
Test the range of user_data bits
jorangreef File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.