Concurrent Generic Drivers
Previously, the Device Manager let drivers process only one request at a time. Although multiple requests could be pending for a driver, the Device Manager passed each new request to the driver only when the previous request was done.
Many clients of the present Device Manager contain work arounds that let the driver handle multiple requests
concurrently. The Device Manager now lets native device drivers handle concurrent tasks more simply.
Drivers that support simultaneous requests should set the
kDriverIsConcurrent
bit of the
driverRuntime
flags word in the driver description structure. When dealing with a concurrent device, the Device Manager alters its request management as follows:
-
All I/O requests it receives are immediately forwarded to the appropriate driver.
-
The
drvrActive
bit (bit 7) in the
dCtlFlags
field of the device control block is never set.
-
When a driver chooses to do standard Device Manager queuing, the parameter blocks corresponding to its requests are placed onto the device's request queue rooted by the
dCtlQHdr
field of the device control block.
-
A driver that chooses to queue requests to an internal queue should set the
kdriverQueuesIOPB
bit in the
driverRuntime
flags word in the
DriverDescriptor
structure. This bit prevents the Device Manager from queueing the request to the DCE request queue. Drivers using the
kdriverQueuesIOPB
option bit must dequeue the I/O parameter block (IOPB) from any internal queues before calling
IOCommandIsComplete.
-
A driver must use the
IOCommandIsComplete
service to complete a request. It may not use the original
IODone
service.
IOCommandIsComplete
is described in the next section.
-
A driver is responsible for ensuring that all requests have been completed prior to returning from a
Finalize
request. Once a
Finalize
request has been made to a concurrent driver, no further requests will be made to the driver until the driver has completed the
Finalize
request and the driver is again initialized.
© 1999 Apple Computer, Inc. (Last Updated 26 March 99)