hare

The Hare programming language
git clone https://git.torresjrjr.com/hare.git
Log | Files | Refs | README | LICENSE

commit aee0f267ee7674fbc2055ae338c642cb9de7bdda
parent b6b934c717f9474d0a67104172eb42c270dd77a0
Author: Drew DeVault <sir@cmpwn.com>
Date:   Fri, 14 May 2021 12:30:06 -1000

rt: add io_uring syscalls

Diffstat:
Mrt/+linux/syscalls.ha | 28++++++++++++++++++++++++++++
1 file changed, 28 insertions(+), 0 deletions(-)

diff --git a/rt/+linux/syscalls.ha b/rt/+linux/syscalls.ha @@ -597,3 +597,31 @@ export fn setpriority(which: int, who: id_t, prio: int) (void | errno) = { wrap_return(syscall3(SYS_setpriority, which: u64, who: u64, prio: u64))?; return; }; + +export fn io_uring_setup(entries: u32, params: *void) (int | errno) = { + return wrap_return(syscall2(SYS_io_uring_setup, + entries: u64, params: uintptr: u64))?: int; +}; + +export fn io_uring_register( + fd: uint, + opcode: uint, + arg: nullable *void, + nr_args: uint, +) (void | errno) = { + wrap_return(syscall4(SYS_io_uring_register, + fd: u64, opcode: u64, arg: uintptr: u64, nr_args: u64))?; + return; +}; + +export fn io_uring_enter( + fd: uint, + to_submit: uint, + min_complete: uint, + flags: uint, + sig: const nullable *sigset, +) (uint | errno) = { + return wrap_return(syscall5(SYS_io_uring_enter, + fd: u64, to_submit: u64, min_complete: u64, + flags: u64, sig: uintptr: u64))?: uint; +};