Included Headers

  • <sys/cdefs.h>

  • <AvailabilityMacros.h>

  • <libkern/OSTypes.h>

  • <mach/port.h>

  • <IOKit/IOReturn.h>

  • <IOKit/IODataQueueShared.h>



func IODataQueueAllocateNotificationPort()

Allocates and returns a new mach port able to receive data available notifications from an IODataQueue.

func IODataQueueDataAvailable(UnsafeMutablePointer<IODataQueueMemory>!)

Used to determine if more data is avilable on the queue.

func IODataQueueDequeue(UnsafeMutablePointer<IODataQueueMemory>!, UnsafeMutableRawPointer!, UnsafeMutablePointer<UInt32>!)

Dequeues the next available entry on the queue and copies it into the given data pointer.

func IODataQueuePeek(UnsafeMutablePointer<IODataQueueMemory>!)

Used to peek at the next entry on the queue.

func IODataQueueSetNotificationPort(UnsafeMutablePointer<IODataQueueMemory>!, mach_port_t)

Creates a simple mach message targeting the mach port specified in port.

func IODataQueueWaitForAvailableData(UnsafeMutablePointer<IODataQueueMemory>!, mach_port_t)

Wait for an incoming dataAvailable message on the given notifyPort.