Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista Drivers > Re: udelay (Linux) equivalent API in WDK driver?

Reply
Thread Tools Display Modes

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

 
 
David Craig
Guest
Posts: n/a

 
      09-14-2010
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:c19b93dd-996c-4366-8f62-...
> 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.


 
Reply With Quote
 
 
 
 
Tim Roberts
Guest
Posts: n/a

 
      09-15-2010
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.
 
Reply With Quote
 
 
 
 
RossettoeCioccolato
Guest
Posts: n/a

 
      09-15-2010
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.


 
Reply With Quote
 
Maxim S. Shatskih
Guest
Posts: n/a

 
      09-16-2010
> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: udelay (Linux) equivalent API in WDK driver? RossettoeCioccolato Windows Vista Drivers 0 09-13-2010 04:12 PM
WDK UMDF USB pipe api Mike Linger Windows Vista Drivers 2 05-03-2009 04:13 AM
WDK Preprocessor.exe tool to be removed from the next WDK release Tanya Radeva [MSFT] Windows Vista Drivers 0 10-08-2008 10:23 PM
SetupDiXXX equivalent of CM_Get_Parent() Api. allen.tian@gmail.com Windows Vista Drivers 1 11-03-2006 05:26 AM
New Windows Vista WDK Released to WDK Beta Tester's! Windows Vista General Discussion 9 07-27-2006 12:51 PM