IODataQueueWaitForAvailableData

Function IODataQueueWaitForAvailableData 

Source
pub unsafe extern "C-unwind" fn IODataQueueWaitForAvailableData(
    data_queue: *mut IODataQueueMemory,
    notification_port: mach_port_t,
) -> IOReturn
Available on crate feature libc only.
Expand description

Wait for an incoming dataAvailable message on the given notifyPort.

This method will simply wait for an incoming message on the given notifyPort. Once it is received, the return from mach_msg() is returned.

Parameter dataQueue: The IODataQueueMemory region mapped from the kernel.

Parameter notificationPort: Mach port on which to listen for incoming messages.

Returns: Returns kIOReturnSuccess on success. Returns kIOReturnBadArgument if either dataQueue is 0 (NULL) or notifyPort is MACH_PORT_NULL. Returns the result of the mach_msg() listen call on the given port.

ยงSafety

data_queue must be a valid pointer.