Contents

IODataQueueWaitForAvailableData(_:_:)

Wait for an incoming dataAvailable message on the given notifyPort.

Declaration

func IODataQueueWaitForAvailableData(_ dataQueue: UnsafeMutablePointer<IODataQueueMemory>!, _ notificationPort: mach_port_t) -> IOReturn

Parameters

  • dataQueue:

    The IODataQueueMemory region mapped from the kernel.

  • notifyPort:

    Mach port on which to listen for incoming messages.

Return Value

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

Discussion

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

See Also

Miscellaneous