Re: DeviceIoControl and Timeout

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Don Burn (burn_at_stopspam.acm.org)
Date: 08/04/04


Date: Wed, 4 Aug 2004 10:28:18 -0400

You either are handling a timeout independant of overlapped I/O or
independant of the driver. In the first model, a driver check a request for
the amount of time it has been waiting for data and complete the IRP with an
error if more time than desired has passed. The timeout value is either
fixed or passed in to the driver by another deviceiocontrol before the
request of the type with a timeout is issued.

With the second approack, you issue an overlapped I/O with an event then
wait on the event with a timeout, if the timeout occurs cancel the I/O.
There are many variations on these themes but these are the basic ones.

-- 
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply
"Dennis Burns" <dburns@rtessentials.com> wrote in message
news:%23bpoqAieEHA.3148@TK2MSFTNGP10.phx.gbl...
> How do I specify a timeout when doing overlapped IO, and calling
> DeviceIoControl?
>
> What does the driver have to do to implement this?
>
> How does the User mode code know when the timeout occurs?
>
> Thanks in advance for the help,
> Dennis
>
>


Relevant Pages

  • Re: Problems with the block-layer timeouts
    ... clear a idea of when the timeout period should begin. ... Each request has its own timer, and as it is added to the queue, we ... What the driver chooses to do with the ...
    (Linux-Kernel)
  • Re: SDIO: IO-Ready Bit
    ... > I'm working on SDIO multi function device. ... Each of the sub devices has it's own driver. ... > timeout = jiffies + HZ ... > the other sub devices will fail in their probe functions while calling ...
    (Linux-Kernel)
  • [BUG 2.6.21-rc3-git9] SATA NCQ failure with Samsum HD401LJ
    ... timeout while trying to write to my SATA hard disk. ... sata_nv driver for the on-board SATA controller. ... # ACPI Support ... # PCI Hotplug Support ...
    (Linux-Kernel)
  • Re: [RFD] Automatic suspend
    ...   to have more than one wakelock held at any time. ... The timeout used when a driver returns -EBUSY is arbitrary, ... IMO every code path doing something that makes automatic suspend ...
    (Linux-Kernel)
  • Re: Peeking in to the serial buffer
    ... > Mr Kenney, if you were a female, I'd send you big kisses for the timeout ... > functionality of the terminal driver interface. ... Wish I could take credit for that but it predates my working on the driver. ...
    (comp.os.vms)