Build on the extensive work already done
IoUring: add fixed_fd_install, ftruncate, cmd_discard
Working on IoUring pipe flags
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Cleanup linux/test.zig
type futex/2_* uaddr as *const u32
consider changing to *const atomic.Value(u32)
Use At Flags in fstatat
Use EpollOp in epoll_ctl syscall
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add futex_* operations to IoUring
Refactor Futex 2 flags into Futex2 struct
add mpol to Wait flags and fix private field as its 128 not 32
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Update futex2_* functions and constants to use the new Futex2 type
Improve the Api of futex2_* functions to be more idiomatic Zig
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
ignore prep_openat2* for now
add non-at variant of some unlink, rename, mkdir, symlink, link
TODO: add Sync File Flags
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add timeout update, cancel_fd, epoll_wait, files_update, open, open_direct, f/madvice
don't implement f/madvice64 for now I doubt it is used by a lot of people in practice
Implement BufferGroup read_multishot
Try to make definition of function align as logically as posible with
liburing to make keeping our implementation in sync easy
TODO: add M/Fadvice enum flags
TODO: understand buffer_selection and how its different from BufferGroup
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
add IoUring tee syscall functionality
adapt ReadBuffer union idea for read_fixed to support fixed read and readv
Use same idea and create a WriteBuffer type for write() and write_fixed()
ignored flags for splice and tee lets see if they become important in
the future
add a get_data helper to Cqe
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Future enhancement:
enter_ring_fd: u24,
init_flags: u8,
register functions that require the extra fields above like
io_uring_register_ring_fd, io_uring_close_ring_fd,
io_uring_clone_buffers_offset, io_uring_set_iowait not implemented
register_*_tag functions not implemented
remove unnecessary use of @ptrCast in io_uring_register
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
update io_uring_enter and io_uring_register syscalls to
use IoUring flags and types
Cleanup comments
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Prefer Using aliases over packed union field
Fix bug in HANDLE_FID declaration
Use EpollOp op type and Epoll packed struct flag type in IoUring
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Replace SO with So type and Add SO named constants for compatability
Replace SOL with Sol type and Add SOL named constants for compatability
Replace some more typed flags with their typed equivalent
Remove any unnecessary IoUring dependency on linux.*
Add TODOs for all untyped flags
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
4❯ zig test lib/std/std.zig --zig-lib-dir lib --test-filter "os.linux"
68/116 os.linux.test.test.futex2_wait...SKIP
69/116 os.linux.test.test.futex2_wake...SKIP
70/116 os.linux.test.test.futex2_requeue...SKIP
111/116 os.linux.IoUring.test.waitid...SKIP
116/116 os.linux.IoUring.test.bind/listen/connect...SKIP
111 passed; 5 skipped; 0 failed.
fix skipKernelLessThan fn to work on wsl linux
fix logical error in flags compatibility check
Update all IoUring to use the implemented flags
bandage types that affect posix for now so that the scope
doesn't become unmanageable
TODO: impl linux.SOL and linux.SO types
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add Shut, PF, AF, IPPROTO types
Update IoUring and test to use some of this flags
TODO: avoid breaking API and make transitioning smooth
Instead mark the previous API as deprecated for at least
One zig release while using the new in the Zig codebase
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Add RenameFlags for IoUring renameat
Start update io_uring Types in linux.zig to use IoUring
Continue change options and flags to Typed types
Fix test cases to use updated IoUring flags and options
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
Improve naming and namespacing of IoUring flags and types to
match Zig Style
move some flags from uflags to its type
Add matches doc comments to make it easy to match Zig IoUring types
to liburing
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>
and use linux Flags where appropriate
constants is a namespace
make AsyncCancel flags more descriptive
move cqe.flags into the Cqe type
make io_uring_sqe ioprio a packed union of SendRecv & Accept
TODO: move some of the used linux Flags to be packed structs
Signed-off-by: Bernard Assan <mega.alpha100@gmail.com>