IOUserNetworkTxSubmissionQueue - SetDispatchQueue - QUEUENAME

Can someone provide a short example of how to use the QUEUENAME macro in the iig file?

For an IOUserNetworkTxSubmissionQueue, it appears to be necessary to do an IODispatchQueue::Create("name", &IODispatchQueue queue) and then do a SetDispatchQueue("queue_name", queue).

The documentation for IOService::SetDispatchQueue() says

The name to assign to the queue. Use this name with the QUEUENAME macro to designate where you want the methods of your class to execute. Include that macro at the end of your method signature methods in the .iig file of your class.





Replies

Finally found this in the documentation: https://developer.apple.com/documentation/driverkit/queuename?language=occ

With this example, where the relevant QUEUENAME(...) is only seen in the sample code window when you slide the bottom scrollbar over :-(

Code Block
TxComplete (OSAction *action,
uint32_t ioCompletionIndex,
uint32_t ioCompletionCount,
const uint32_t actualByteCountArray[kIOUSBHostPipeBundlingMax],
int actualByteCountArrayCount,
const kern_return_t statusArray[kIOUSBHostPipeBundlingMax],
int statusArrayCount) TYPE(IOUSBHostPipe::CompleteAsyncIOBundled) QUEUENAME(tx_pipe_dq);