Notes and examples for multithreaded TTY drivers
NOTE:
This chapter has not been reviewed for the current release.
The information is generally accurate,
although some details may have changed.
Check the appropriate manual pages
for the most current information.
``Multithreading device drivers''
discusses the SCO multiprocessing architecture
and gives guidelines for multithreading drivers.
This section examines the procedures
for converting a TTY character device driver
to take advantage of multiprocessing capability.
The procedure for multithreading TTY
character device drivers
can be summarized in these stages:
-
Register the driver as multithreaded.
-
Ensure mutual exclusion applies to the
tp->state
modifications (either setting or clearing the flag).
-
Modify the driver routines:
open(D2oddi),
close(D2oddi),
read(D2oddi),
write(D2oddi),
ioctl(D2oddi),
param( ),
proc(D2oddi),
intr(D2oddi),
poll(D2oddi),
and
rint( ).
-
Identify critical code and add locks to ensure mutual exclusion.
© 2005 The SCO Group, Inc. All rights reserved.