Notes and examples for multithreaded block drivers
To illustrate how block drivers are multithreaded,
the following sections contain annotated code fragments.
Two main areas are covered:
-
The driver must register itself as multithreaded
during its initialization routine.
-
Block I/O operations are coded
in the driver's
strategy(D2oddi)
and
start(D2oddi)
routines.
For multithreaded drivers,
a series of lock_xxtab structures
are used with the
lockb(D3oddi)
and
unlockb(D3oddi)
functions to maintain data integrity.
The following sections illustrate how the
strategy( ),
start( ),
and
intr( )
routines are coded
for multithreaded drivers.
© 2005 The SCO Group, Inc. All rights reserved.