Hello Everyone,
I am working on migrating a KEXT to DriverKit but am struggling to resolve a specific issue. The code in question is simple, but I haven't been able to find a solution.
void AME_IO_milliseconds_Delay(AME_U32 Delay)
{
Log("AME_IO_milliseconds_Delay()");
IOSleep(Delay);
return;
}
//delay for a number of microseconds
void AME_IO_microseconds_Delay(AME_U32 Delay)
{
Log("AME_IO_microseconds_Delay()");
IODelay(Delay);
return;
}
I've sought help from Copilot and ChatGPT, but their suggestions haven't worked. Any guidance on how to implement this functionality in DriverKit would be greatly appreciated.
Thank you for your time and assistance.
Best regards, Charles
I am working on migrating a KEXT to DriverKit but am struggling to resolve a specific issue. The code in question is simple, but I haven't been able to find a solution.
What problem are you actually having? At purely technical level, "IOSleep" and "IODelay" are both defined in DriverKit and, conceptually, do the same thing as the equivalent KPI. However, there implementation is very different (since the DEXT runs in user space), so I suspect the actual timing behavior is somewhat different.
__
Kevin Elliott
DTS Engineer, CoreOS/Hardware