mirror of
https://github.com/ii64/gouring.git
synced 2024-11-22 15:06:42 +01:00
60 lines
951 B
Go
60 lines
951 B
Go
package gouring
|
|
|
|
import "unsafe"
|
|
|
|
var (
|
|
SizeofUnsigned = unsafe.Sizeof(uint32(0))
|
|
SizeofUint32 = unsafe.Sizeof(uint32(0))
|
|
SizeofIoUringSqe = unsafe.Sizeof(IoUringSqe{})
|
|
SizeofIoUringCqe = unsafe.Sizeof(IoUringCqe{})
|
|
)
|
|
|
|
type IoUring struct {
|
|
Sq IoUringSq
|
|
Cq IoUringCq
|
|
Flags uint32
|
|
RingFd int32
|
|
|
|
Features uint32
|
|
EnterRingFd int32
|
|
IntFlags uint8
|
|
|
|
pad [3]uint8
|
|
pad2 uint32
|
|
}
|
|
|
|
type IoUringSq struct {
|
|
Head *uint32
|
|
Tail *uint32
|
|
RingMask *uint32
|
|
RingEntries *uint32
|
|
Flags *uint32
|
|
Dropped *uint32
|
|
|
|
Array uint32Array //ptr arith
|
|
Sqes ioUringSqeArray //ptr arith
|
|
|
|
SqeHead uint32
|
|
SqeTail uint32
|
|
|
|
RingSz uint32
|
|
RingPtr uintptr
|
|
|
|
pad [4]uint32
|
|
}
|
|
|
|
type IoUringCq struct {
|
|
Head *uint32
|
|
Tail *uint32
|
|
RingMask *uint32
|
|
RingEntries *uint32
|
|
Flags *uint32
|
|
Overflow *uint32
|
|
|
|
Cqes ioUringCqeArray //ptr arith
|
|
|
|
RingSz uint32
|
|
RingPtr uintptr
|
|
|
|
pad [4]uint32
|
|
}
|