hare

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

commit be9a5e4284d717e07ca8f66a6f717cc4d1728d23
parent 64562a0e9334bd29dee3f10d351cdd24c0e14d29
Author: Drew DeVault <sir@cmpwn.com>
Date:   Wed, 19 May 2021 17:45:37 -0400

linux::io_uring: add close

Signed-off-by: Drew DeVault <sir@cmpwn.com>

Diffstat:
Mlinux/io_uring/sqe.ha | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/linux/io_uring/sqe.ha b/linux/io_uring/sqe.ha @@ -267,3 +267,8 @@ export fn accept( sqe.accept_flags = aflags; sqe.addr2 = addrlen; }; + +// Prepares an [[sqe]] operation which closes a file descriptor. +export fn close(sqe: *sqe, fd: int, flags: sqe_flags...) void = { + preprw(sqe, op::CLOSE, fd, null, 0, 0, flags...); +};