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. Advertising

  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. Advertising

  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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
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:
    255
  2. anonymous

    What is the Linux dummy net driver equivalent on Windows?

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

    , Nov 3, 2006, in forum: Windows Vista Drivers
    Replies:
    1
    Views:
    1,441
    Robert Marquardt
    Nov 3, 2006
  4. 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:
    285
    Tanya Radeva [MSFT]
    Oct 8, 2008
  5. RossettoeCioccolato

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

    RossettoeCioccolato, Sep 13, 2010, in forum: Windows Vista Drivers
    Replies:
    0
    Views:
    563
    RossettoeCioccolato
    Sep 13, 2010
Loading...

Share This Page