DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
Notes and examples for multithreaded TTY drivers

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:

  1. Register the driver as multithreaded.

  2. Ensure mutual exclusion applies to the tp->state modifications (either setting or clearing the flag).

  3. Modify the driver routines: open(D2oddi), close(D2oddi), read(D2oddi), write(D2oddi), ioctl(D2oddi), param( ), proc(D2oddi), intr(D2oddi), poll(D2oddi), and rint( ).

  4. Identify critical code and add locks to ensure mutual exclusion.

© 2005 The SCO Group, Inc. All rights reserved.