Go io uring syscall implementation without CGO, rewrite on branch v0.4
Find a file
2022-10-12 23:19:37 +07:00
assets doc: update graph 2022-07-28 19:47:38 +07:00
bench/perf bench/perf: handle interrupt from iouring enter 2022-07-28 19:48:32 +07:00
.gitignore all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
go.mod all: initial files 2022-07-05 04:52:54 +07:00
go.sum all: initial files 2022-07-05 04:52:54 +07:00
hdr.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
hdr_int_flags.go all: initial files 2022-07-05 04:52:54 +07:00
hdr_struct.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +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 all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
queue.go fix: minor code typo (#5) 2022-10-02 19:20:08 +07:00
queue_test.go fix: unresolved typo 2022-10-12 23:16:02 +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 all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
sigset.go all: initial files 2022-07-05 04:52:54 +07:00
syscall.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
syscall_nr_amd64.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +07:00
uring.go fix: minor code typo (#5) 2022-10-02 19:20:08 +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 ring: support sqe128, cqe32 index array 2022-10-12 23:19:37 +07:00
util_ptr_arith_test.go all: use of unsafe pointer for ring, and adjustments 2022-07-28 19:45:51 +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