mirror of
https://github.com/ii64/gouring.git
synced 2025-04-26 05:42:48 +02:00
ring: big cqe support
This commit is contained in:
parent
56c528fe00
commit
8dea91c509
2 changed files with 16 additions and 2 deletions
5
hdr.go
5
hdr.go
|
@ -17,8 +17,9 @@ import (
|
|||
*/
|
||||
type IoUringSqe_Union1 uint64
|
||||
|
||||
func (u *IoUringSqe_Union1) SetOffset(v uint64) { *u = IoUringSqe_Union1(v) }
|
||||
func (u *IoUringSqe_Union1) SetAddr2(v uint64) { *u = IoUringSqe_Union1(v) }
|
||||
func (u *IoUringSqe_Union1) SetOffset(v uint64) { *u = IoUringSqe_Union1(v) }
|
||||
func (u *IoUringSqe_Union1) SetOffset_RawPtr(v unsafe.Pointer) { *u = IoUringSqe_Union1((uintptr)(v)) }
|
||||
func (u *IoUringSqe_Union1) SetAddr2(v uint64) { *u = IoUringSqe_Union1(v) }
|
||||
|
||||
type IoUringSqe_Union2 uint64
|
||||
|
||||
|
|
13
hdr_extra.go
Normal file
13
hdr_extra.go
Normal file
|
@ -0,0 +1,13 @@
|
|||
package gouring
|
||||
|
||||
import (
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
/*
|
||||
* If the ring is initialized with IORING_SETUP_CQE32, then this field
|
||||
* contains 16-bytes of padding, doubling the size of the CQE.
|
||||
*/
|
||||
func (cqe *IoUringCqe) GetBigCqe() *[2]uint64 {
|
||||
return (*[2]uint64)(unsafe.Pointer(uintptr(unsafe.Pointer(cqe)) + SizeofIoUringSqe))
|
||||
}
|
Loading…
Add table
Reference in a new issue