IODataQueueDequeue(_:_:_:)
Dequeues the next available entry on the queue and copies it into the given data pointer.
Declaration
func IODataQueueDequeue(_ dataQueue: UnsafeMutablePointer<IODataQueueMemory>!, _ data: UnsafeMutableRawPointer!, _ dataSize: UnsafeMutablePointer<UInt32>!) -> IOReturnParameters
- dataQueue:
The IODataQueueMemory region mapped from the kernel.
- data:
A pointer to the data memory region in which to copy the next entry data on the queue. If this parameter is 0 (NULL), it will simply move to the next entry.
- dataSize:
A pointer to the size of the data parameter. On return, this contains the size of the actual entry data - even if the original size was not large enough.
Return Value
Returns kIOReturnSuccess on success. Other return values possible are: kIOReturnUnderrun - queue is empty, kIOReturnBadArgument - no dataQueue or no dataSize, kIOReturnNoSpace - dataSize is too small for entry.
Discussion
This function will dequeue the next available entry on the queue. If a data pointer is provided, it will copy the data into the memory region if there is enough space available as specified in the dataSize parameter. If no data pointer is provided, it will simply move the head value past the current entry.