IODataQueuePeek

Function IODataQueuePeek 

Source
pub unsafe extern "C-unwind" fn IODataQueuePeek(
    data_queue: *mut IODataQueueMemory,
) -> *mut IODataQueueEntry
Expand description

Used to peek at the next entry on the queue.

This function can be used to look at the next entry which allows the entry to be received without having to copy it with IODataQueueDequeue. In order to do this, call IODataQueuePeek to get the entry. Then call IODataQueueDequeue with a NULL data pointer. That will cause the head to be moved to the next entry, but no memory to be copied.

Parameter dataQueue: The IODataQueueMemory region mapped from the kernel.

Returns: Returns a pointer to the next IODataQueueEntry if one is available. Zero is returned if the queue is empty.

ยงSafety

data_queue must be a valid pointer.