Re: udelay (Linux) equivalent API in WDK driver?

Discussion in 'Windows Vista Drivers' started by David Craig, Sep 14, 2010.

  1. David Craig

    David Craig Guest

    This is a very frequent question about the design of device driver
    interfaces supported by Unix, Linux, and Windows. You omitted so much
    information that providing correct answers is not possible. You forgot to
    specify at what IRQL the code you wish to protect can be running, is there
    hardware involved, what type of hardware, does it provide a Windows port
    driver, does it require a miniport of some sort, and what is the port
    driver?


    "dsrking" <> wrote in message
    news:...
    > Hi
    >
    > I am porting Linux driver to Windows XP. In linux driver they used
    > 'udelay' API for some micro seconds delay.
    > How can i port this API in Windows Driver (KMDF)?
    >
    > thanks in Adavance,
    > D.
     
    David Craig, Sep 14, 2010
    #1
    1. Advertisements

  2. David Craig

    Tim Roberts Guest

    dsrking <> wrote:
    >
    >'KeStallExecutionProcessor' is working for my case.


    Remember that KeStallExecutionProcessor runs a tight CPU loop, using 100%
    of the CPU. KeDelayExecutionThread is a better choice, because it releases
    the CPU during the wait.
    --
    Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Sep 15, 2010
    #2
    1. Advertisements

  3. Tim,

    The premise is that the OP only wants to wait a few useconds, which makes
    KeStallExecutionProcessor the better choice. KeDelayExecutionThread is the
    better choice for longer waits, measured in milliseconds.

    Regards,

    Rossetoecioccolato.
     
    RossettoeCioccolato, Sep 15, 2010
    #3
  4. > But I did not get any interrupt for my device. should we do anything
    > inside the code for interrupt register and etc., for non pnp isa
    > device in WDF driver?


    No.

    NonPnP ISA and PnP ISA are the same in driver code. The only difference is that you must register the IRQs in the INF file.

    --
    Maxim S. Shatskih
    Windows DDK MVP

    http://www.storagecraft.com
     
    Maxim S. Shatskih, Sep 16, 2010
    #4
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Guest

    New Windows Vista WDK Released to WDK Beta Tester's!

    Guest, Jul 27, 2006, in forum: Windows Vista General Discussion
    Replies:
    9
    Views:
    660
  2. shankar

    linux's hdparm command equivalent in windows ??

    shankar, Oct 20, 2003, in forum: Windows Vista Drivers
    Replies:
    1
    Views:
    3,807
    Maxim S. Shatskih
    Oct 20, 2003
  3. anonymous

    What is the Linux dummy net driver equivalent on Windows?

    anonymous, Jan 9, 2006, in forum: Windows Vista Drivers
    Replies:
    4
    Views:
    588
    Maxim S. Shatskih
    Jan 9, 2006
  4. SetupDiXXX equivalent of CM_Get_Parent() Api.

    , Nov 3, 2006, in forum: Windows Vista Drivers
    Replies:
    1
    Views:
    2,008
    Robert Marquardt
    Nov 3, 2006
  5. Tanya Radeva [MSFT]

    WDK Preprocessor.exe tool to be removed from the next WDK release

    Tanya Radeva [MSFT], Oct 8, 2008, in forum: Windows Vista Drivers
    Replies:
    0
    Views:
    622
    Tanya Radeva [MSFT]
    Oct 8, 2008
  6. Miha Pihler [MVP]

    Re: Some type of equivalent of a "who" command from Linux

    Miha Pihler [MVP], Dec 7, 2006, in forum: Windows Server
    Replies:
    1
    Views:
    837
    Miha Pihler [MVP]
    Dec 7, 2006
  7. scur
    Replies:
    1
    Views:
    488
    Tim Roberts
    Aug 31, 2009
Loading...