Need Windows equivalent function RRS feed

  • Question

  • Hi experts,

    I am trying to port a certain part of Linux driver code to windows kmdf driver, stuck at some Linux internal calls like in_interrupt(), in_atomic(), wait_for_completion_interruptible_timeout()..

    tried to analyze the above calls, but can't find any relevant windows functions.



    Friday, April 1, 2016 1:32 PM


  • Trying to take a Linux driver and directly port it to Windows will produce an extremely poor driver, since there are too many differences in the operating systems.   This is especially true now that any hardware driver should be KMDF.

    So rather than looking at the specifics, take a look at the supported operations, and the interactions with the hardware and migrate these to Windows.  Even here you should be looking closely at the model, since Linux assumes synchronous requests in many cases where Windows requires asynchronous.  

    There is no equivalent to in_interrupt or in_atomic.  In part the interrupt control model is totally different in Windows than Linux.  There is no completion in Windows, the closest is waiting for an event.

    Step back and look at how the specific operations need to interact with the hardware, then look at the KMDF driver samples and see how to apply that knowledge to a new driver.

    Don Burn Windows Driver Consulting Website:

    Friday, April 1, 2016 2:16 PM