hare

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

commit 5fb8ec29c21a8f68e9da23b1a972dadb3c98cfd2
parent cbd9c051abc4f7409d4e9c09553e79297a8b4992
Author: Drew DeVault <sir@cmpwn.com>
Date:   Tue, 19 Oct 2021 18:20:43 +0200

iobus: add busfile

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

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

diff --git a/iobus/io_uring/bus.ha b/iobus/io_uring/bus.ha @@ -22,6 +22,11 @@ export fn destroy(bus: *bus) void = { io_uring::finish(&bus.uring); }; +// Returns an [[io::file]] for the bus itself. +export fn busfile(bus: *bus) io::file = { + return bus.uring.fd; +}; + // Registers a set of I/O operations with the queue, without submitting them. // Must call [[submit]] later submit them to the host. export fn enqueue(bus: *bus, ops: *handle...) void = {