getWorkLoop(), addEventSource() in case of Dext?

Hi All,


I am trying to write sample USB userspace driver(Dext) by referring to Kext driver.


In Kext, in our driver's Start() we initialize workloop and commandgate. Then we addEventSource to the commandgate.

When we port this driver to Dext, we replace workloop with IODispatchQueue("WWDC 2019 - 702" video-System Extensions and DriverKit,). There is no way to add event sources in case of Dext. So how should we think about the design w.r.t Dext?

In short,

1) do we need to acquire workloop in case of Dext? If yes, how to do that.

2) do we need to doaddEventSource function in Dext? If yes, how to do that.


Thank you.