mirror of
https://github.com/ii64/gouring.git
synced 2024-11-21 22:46:22 +01:00
ring: support sqe128, cqe32 index array
This commit is contained in:
parent
b60c5ed2ba
commit
4937c09d11
1 changed files with 8 additions and 0 deletions
|
@ -16,6 +16,10 @@ func ioUringSqeArray_Index(u ioUringSqeArray, i uintptr) *IoUringSqe {
|
|||
return (*IoUringSqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + SizeofIoUringSqe*i))
|
||||
}
|
||||
|
||||
func ioUringSqe128Array_Index(u ioUringSqeArray, i uintptr) *IoUringSqe {
|
||||
return (*IoUringSqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + (SizeofIoUringSqe+64)*i))
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
type ioUringCqeArray = unsafe.Pointer // *IoUringCqe
|
||||
|
@ -24,6 +28,10 @@ func ioUringCqeArray_Index(u ioUringCqeArray, i uintptr) *IoUringCqe {
|
|||
return (*IoUringCqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + SizeofIoUringCqe*i))
|
||||
}
|
||||
|
||||
func ioUringCqe32Array_Index(u ioUringCqeArray, i uintptr) *IoUringCqe {
|
||||
return (*IoUringCqe)(unsafe.Pointer(uintptr(unsafe.Pointer(u)) + (SizeofIoUringCqe+SizeofIoUringCqe)*i))
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
type UserData [8]byte // uint64
|
||||
|
|
Loading…
Reference in a new issue