2

I need to enqueue in and out requests on bulk, interrupt and isochronous endpoints at the same time. Can I expect that all callbacks from these requests to come one by one? Or can expect multiple callbacks at the same time?

tuple_cat
  • 1,165
  • 2
  • 7
  • 22

1 Answers1

2

They should come in, serially, on the dispatch queue which is set for the relevant handler function.

So if you set all the handler functions to the same queue, they'll come in on the same thread, one after the other. This is also what happens by default, which leaves them on the default queue, aka kIOServiceDefaultQueueName.

DriverKit IODispatchQueues are currently always serial, so will only run on one thread at a time. (This is unlike regular user space GCD dispatch_queue_t dispatch queues, where concurrent variants exist.)

At least, that's my understanding and experience so far.

pmdj
  • 22,018
  • 3
  • 52
  • 103