Go io uring syscall implementation without CGO, rewrite on branch v0.4
Find a file
2023-04-26 00:28:02 +07:00
assets doc: update graph 2022-10-25 18:23:01 +07:00
bench/perf bench/perf: handle interrupt from iouring enter 2022-07-28 19:48:32 +07:00
examples chore: example eventloop add debug 2023-04-26 00:28:02 +07:00
ioctl chore: adjust read-write, nvme example 2023-04-16 17:18:15 +07:00
nvme fix(nvme): constant folds for uring, ioctl cmd ops 2023-04-16 10:46:28 +07:00
.gitignore chore: ignore code workspace 2022-10-24 11:34:09 +07:00
atomic.go feat: seq_cst implementation 2022-10-13 22:08:46 +07:00
atomic_amd64.s feat: seq_cst implementation 2022-10-13 22:08:46 +07:00
go.mod fix: use sigset from golang.org/x/sys/unix 2022-10-25 15:27:19 +07:00
go.sum fix: use sigset from golang.org/x/sys/unix 2022-10-25 15:27:19 +07:00
go.work chore: go work add library 2023-04-25 23:07:58 +07:00
hdr.go feat: get probe ring 2023-04-17 18:38:30 +07:00
hdr_extra.go feat: get probe ring 2023-04-17 18:38:30 +07:00
hdr_int_flags.go all: initial files 2022-07-05 04:52:54 +07:00
hdr_struct.go feat: get probe ring 2023-04-17 18:38:30 +07:00
hdr_test.go test: sqe and cqe size check 2022-10-12 23:17:41 +07:00
inline_cost.py all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
LICENSE doc: add license 2022-09-04 17:41:10 +07:00
Makefile all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
prep.go feat: added some prepare helper 2023-04-16 17:50:51 +07:00
queue.go chore: sync liburing queue 2023-04-26 00:02:19 +07:00
queue_test.go chore: sync liburing queue 2023-04-26 00:02:19 +07:00
README.md doc: add graph 2022-07-07 09:57:32 +07:00
register.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
setup.go chore: sync liburing 2023-04-16 03:56:10 +07:00
sigset.go fix: use sigset from golang.org/x/sys/unix 2022-10-25 15:27:19 +07:00
syscall.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
syscall_nr.go fix: syscall nr 2023-04-16 03:46:47 +07:00
uring.go feat: get probe ring 2023-04-17 18:38:30 +07:00
uring_bench_test.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
uring_test.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
util_ptr_arith.go chore: sync liburing 2023-04-16 03:56:10 +07:00
util_ptr_arith_test.go fix: change base type of UserData to uint64 2022-10-13 22:03:46 +07:00
util_union.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00

gouring

License: MIT Go Reference

go get github.com/ii64/gouring

Example

// setup
h, err := gouring.New(256, 0)
if err != nil { /*...*/ }
defer h.Close() 

sqe := h.GetSQE()
b := []byte("io_uring!\n")
PrepWrite(sqe, 1, &b[0], len(b), 0)

submitted, err := h.SubmitAndWait(1)
if err != nil { /*...*/ }
println(submitted) // 1

var cqe *gouring.IoUringCqe
err = h.WaitCqe(&cqe) 
if err != nil { /*...*/ } // check also EINTR

_ = cqe.UserData
_ = cqe.Res
_ = cqe.Flags

Graph

SQPOLL non-SQPOLL
sqpoll_fig nonsqpoll_fig

Reference

https://github.com/axboe/liburing